diff --git a/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java b/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java index ec8d6176235c1238283a1a0791cf86170a59fdf9..08b157797f3d5064966f1e788bb5768d58c45480 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java @@ -11,8 +11,7 @@ import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * Tests for {@link SLUBXmlFormatValidationPlugin}. @@ -29,7 +28,7 @@ public class TestSLUBXmlFormatValidationPlugin { public void setUp() { Stream<Path> findFiles; try { - findFiles = Files.find(Path.of("resources/test/"), 5, ((path, basicFileAttributes) -> Files.isRegularFile(path))); + findFiles = Files.find(Path.of("resources/test/mods"), 5, ((path, basicFileAttributes) -> Files.isRegularFile(path))); testPaths = findFiles.toArray(Path[]::new); } catch (IOException e) { // do nothing, because nothing found @@ -46,14 +45,14 @@ public class TestSLUBXmlFormatValidationPlugin { System.out.println("file " + path + " ignored"); continue; } - if (path.toString().contains("test-4.2.xml")) { - continue; - } - assertTrue("validateFormat (pass), check if "+path+" exist", Files.exists(path)); - assertTrue("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString())); - assertTrue("validateFormat(" + path + "), is valid?", mock.validateFormat(path.toString())); - assertTrue( "validateFormat(" + path + "), is wellformed?", mock.isWellFormed()); - assertNotNull("getValidationDetails(), " + path + ", not null", mock.getValidationDetails()); + System.out.println("=================================================================================="); + assertTrue ("validateFormat (pass), check if "+path+" exist", Files.exists(path)); + assertTrue ("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString())); + assertTrue ( "validateFormat(" + path + "), is wellformed?", mock.isWellFormed()); + assertNull ( "validateFormat(" + path + "), reports no errors?", mock.getErrors()); + assertNotNull("getValidationDetails(), " + path + ", not null", mock.getValidationDetails()); + assertTrue ("validateFormat(" + path + "), is valid?", mock.isValid()); + } } }