Skip to content
Snippets Groups Projects
Commit d6cc8a6a authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- reordered tests

parent 189f5cb8
No related branches found
No related tags found
No related merge requests found
Pipeline #3593 failed
...@@ -11,8 +11,7 @@ import java.util.HashMap; ...@@ -11,8 +11,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
/** /**
* Tests for {@link SLUBXmlFormatValidationPlugin}. * Tests for {@link SLUBXmlFormatValidationPlugin}.
...@@ -29,7 +28,7 @@ public class TestSLUBXmlFormatValidationPlugin { ...@@ -29,7 +28,7 @@ public class TestSLUBXmlFormatValidationPlugin {
public void setUp() { public void setUp() {
Stream<Path> findFiles; Stream<Path> findFiles;
try { 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); testPaths = findFiles.toArray(Path[]::new);
} catch (IOException e) { } catch (IOException e) {
// do nothing, because nothing found // do nothing, because nothing found
...@@ -46,14 +45,14 @@ public class TestSLUBXmlFormatValidationPlugin { ...@@ -46,14 +45,14 @@ public class TestSLUBXmlFormatValidationPlugin {
System.out.println("file " + path + " ignored"); System.out.println("file " + path + " ignored");
continue; continue;
} }
if (path.toString().contains("test-4.2.xml")) { System.out.println("==================================================================================");
continue; assertTrue ("validateFormat (pass), check if "+path+" exist", Files.exists(path));
} assertTrue ("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString()));
assertTrue("validateFormat (pass), check if "+path+" exist", Files.exists(path)); assertTrue ( "validateFormat(" + path + "), is wellformed?", mock.isWellFormed());
assertTrue("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString())); assertNull ( "validateFormat(" + path + "), reports no errors?", mock.getErrors());
assertTrue("validateFormat(" + path + "), is valid?", mock.validateFormat(path.toString())); assertNotNull("getValidationDetails(), " + path + ", not null", mock.getValidationDetails());
assertTrue( "validateFormat(" + path + "), is wellformed?", mock.isWellFormed()); assertTrue ("validateFormat(" + path + "), is valid?", mock.isValid());
assertNotNull("getValidationDetails(), " + path + ", not null", mock.getValidationDetails());
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment