parent
0de6bfafe5
commit
ef3a3fc240
Binary file not shown.
@ -1,38 +1,32 @@
|
|||||||
package seng202.group9;
|
package seng202.group9;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import org.junit.Test;
|
||||||
import junit.framework.TestCase;
|
import seng202.group9.Controller.App;
|
||||||
import junit.framework.TestSuite;
|
import seng202.group9.Controller.DataException;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test for simple App.
|
* Unit test for simple App.
|
||||||
*/
|
*/
|
||||||
public class AppTest
|
public class AppTest {
|
||||||
extends TestCase
|
@Test
|
||||||
{
|
public void testApp(){
|
||||||
/**
|
App app = new App();
|
||||||
* Create the test case
|
assertTrue(app.getMenuController() == null);
|
||||||
*
|
assertTrue(app.getPrimaryStage() == null);
|
||||||
* @param testName name of the test case
|
try {
|
||||||
*/
|
app.createDataset("FORUNITTESTINGDATASET");
|
||||||
public AppTest( String testName )
|
} catch (DataException e) {
|
||||||
{
|
e.printStackTrace();
|
||||||
super( testName );
|
|
||||||
}
|
}
|
||||||
|
assertEquals(app.getCurrentDataset().getName(), "FORUNITTESTINGDATASET");
|
||||||
|
|
||||||
/**
|
app.deleteDataset(app.getCurrentDataset());
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
for (int i = 0; i < app.getDatasets().size(); i++){
|
||||||
* Rigourous Test :-)
|
assertTrue(!app.getDatasets().get(i).getName().equals("FORUNITTESTINGDATASET"));
|
||||||
*/
|
}
|
||||||
public void testApp()
|
//more to come as the program upgrades for for as of now this is the limit.
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue