@Before public void setUp() { p = new ArgsParser(); // for save x = new XMLTools(); q = new ArgsParser(); // for load xml file made from save q = x.load("./src/test/java/edu/jsu/mcis/xmlFiles/testSave.xml"); n = new ArgsParser(); // for load xml file made NOT from save n = x.load("./src/test/java/edu/jsu/mcis/xmlFiles/testLoadFile.xml"); }
@Test public void testLoadExceptionWithFileNotXMLExtension() { boolean exception = false; try { x.load("thisfiledoesnotexist"); } catch (XMLException e) { exception = true; } finally { assertTrue(exception); } }