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
public class Close extends Commands
{
private int currentBufferIndex;
public Close(Editor editor)
{
super("close", editor);
}
public void execute()
{
editor.deleteCurrentBuffer();
}
}
and another class is
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