diff --git a/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java b/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java index a28bcb6dd9c00282810795c372b0d6e22e48204a..9455d2af9e734e16c8e241d27f5847ca3e27b65f 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/TestSLUBXmlFormatValidationPlugin.java @@ -11,7 +11,8 @@ import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * Tests for {@link SLUBXmlFormatValidationPlugin}. @@ -29,7 +30,7 @@ public class TestSLUBXmlFormatValidationPlugin { public void setUp() { Stream<Path> findFiles; try { - findFiles = Files.find(Path.of("resources/test/mods"), 5, ((path, basicFileAttributes) -> Files.isRegularFile(path))); + findFiles = Files.find(Path.of("resources/test/"), 5, ((path, basicFileAttributes) -> Files.isRegularFile(path))); testPaths = findFiles.toArray(Path[]::new); } catch (IOException e) { // do nothing, because nothing found @@ -50,7 +51,7 @@ public class TestSLUBXmlFormatValidationPlugin { 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()); + assertTrue ( "validateFormat(" + path + "), reports no errors?", mock.getErrors().isEmpty()); assertNotNull("getValidationDetails(), " + path + ", not null", mock.getValidationDetails()); assertTrue ("validateFormat(" + path + "), is valid?", mock.isValid());