Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2008, 01:34 AM
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
Junit
Hi, can someone help me out with basic for junit?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-02-2008, 01:56 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Well, what do you have so far?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-02-2008, 02:19 AM
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
My Whole Assignment works fine, but need to create a Junit for it to test each classes.

Here is two example classes that i have which are part of my assignment
PHP Code:
public class Close extends Commands
{
    private 
int currentBufferIndex;
    
    public 
Close(Editor editor)
    {
        
super("close"editor);    
    }
    
    public 
void execute()
    {
        
editor.deleteCurrentBuffer();
    }

and another class is

PHP Code:
public class Quit extends Commands
{
    public 
Quit(Editor editor)
    {
        
super("quit"editor);    
    }
    
    public 
void execute()
    {
        
System.out.println("Bye!");
        
System.exit(0);
    }

how would i create a Junit for them?

I have only done the following code
import junit.framework.*;
public class Junit
{

}


Thanks heaps
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-02-2008, 06:49 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,402
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Following link may help you. I have use it and explanations on it not bad.


JUnit Testing
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-02-2008, 07:16 AM
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
thanks, i'll have a look into it
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-14-2008, 04:50 AM
Member
 
Join Date: Jun 2008
Posts: 22
ferranb is on a distinguished road
With eclipse and JUnit plugging for eclispe all will be easyer. It helps to code JUnit tests.

Ferran
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-15-2008, 08:47 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,402
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
JUnit is not difficult with NetBeanse too. No need to use separate pluggin for it. But the major question is, how JUnit is doing.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing JUnit PDE with Ant keynan Eclipse 0 02-15-2008 01:35 AM
Creating JUnit Test Cases using NetBeans JavaForums Java Blogs 0 08-06-2007 07:30 PM
Using Junit In Eclipse JavaForums Eclipse 0 05-06-2007 05:41 PM
TRying to use jUnit for Tesing sandor New To Java 3 04-19-2007 01:17 AM


All times are GMT +3. The time now is 06:14 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org