*/
public class XmlUtilsTest {
+ private static final String pathname = "test_xml_files/test_invalid";
+
/**
* Empty the XML directory after the test
*/
fail("XML test file does not exist");
}
assertFalse(XmlUtils.xmlValidate(testXmlFile).isOK());
+
}
+ /**
+ * Test various invalid files and make sure they are invalid
+ */
+ @Test
+ public void testXmlValidateInvalid() {
+ File[] validFiles = (new File(pathname)).listFiles();
+ for (File f : validFiles) {
+ assertFalse("File " + f.getName(), XmlUtils.xmlValidate(f).isOK());
+ }
+ }
+
+
/**
* test the {@link XmlUtils#addXmlFile(File)} method
*/