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

- minor cleanup

parent 76827834
Branches
Tags
No related merge requests found
...@@ -30,7 +30,7 @@ public class TestSLUBXmlFormatValidationPlugin { ...@@ -30,7 +30,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/JATS"), 5, ((path, basicFileAttributes) -> Files.isRegularFile(path))); findFiles = Files.find(Path.of("resources/test/"), 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
...@@ -38,6 +38,7 @@ public class TestSLUBXmlFormatValidationPlugin { ...@@ -38,6 +38,7 @@ public class TestSLUBXmlFormatValidationPlugin {
mock = new SLUBXmlFormatValidationPlugin(); mock = new SLUBXmlFormatValidationPlugin();
initp.put("catalog", "/etc/xml/catalog"); initp.put("catalog", "/etc/xml/catalog");
initp.put("schemacatalog", "example_catalog/schema_catalog.xml"); initp.put("schemacatalog", "example_catalog/schema_catalog.xml");
initp.put("debug", "true");
mock.initParams(initp); mock.initParams(initp);
} }
...@@ -52,10 +53,6 @@ public class TestSLUBXmlFormatValidationPlugin { ...@@ -52,10 +53,6 @@ public class TestSLUBXmlFormatValidationPlugin {
@org.junit.Test @org.junit.Test
public void validateFormat() { public void validateFormat() {
for (Path path : testPaths) { for (Path path : testPaths) {
if (!path.toString().contains("JATS")) {
System.out.println("file " + path + " ignored");
continue;
}
System.out.println("=================================================================================="); System.out.println("==================================================================================");
assertTrue ("validateFormat (pass), check if "+path+" exist", Files.exists(path)); assertTrue ("validateFormat (pass), check if "+path+" exist", Files.exists(path));
assertTrue ("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString())); assertTrue ("validateFormat(" + path + "), returns valid?", mock.validateFormat(path.toString()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment