Hi, can someone help me out with basic for junit?
Printable View
Hi, can someone help me out with basic for junit?
Well, what do you have so far?
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
and another class isCode:public class Close extends Commands
{
private int currentBufferIndex;
public Close(Editor editor)
{
super("close", editor);
}
public void execute()
{
editor.deleteCurrentBuffer();
}
}
how would i create a Junit for them?Code:public class Quit extends Commands
{
public Quit(Editor editor)
{
super("quit", editor);
}
public void execute()
{
System.out.println("Bye!");
System.exit(0);
}
}
I have only done the following code
import junit.framework.*;
public class Junit
{
}
Thanks heaps
Following link may help you. I have use it and explanations on it not bad.
JUnit Testing
thanks, i'll have a look into it
With eclipse and JUnit plugging for eclispe all will be easyer. It helps to code JUnit tests.
Ferran
JUnit is not difficult with NetBeanse too. No need to use separate pluggin for it. But the major question is, how JUnit is doing.