diff --git a/pom.xml b/pom.xml index 7214bfe..12d7e68 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.apache.maven.plugins maven-gpg-plugin 3.2.8 - + @@ -612,12 +612,6 @@ release-sign-artifacts - - - performRelease - true - - @@ -636,6 +630,30 @@ + + release-central + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.central + central-publishing-maven-plugin + + + + owasp-check diff --git a/src/main/java/de/kosit/validationtool/cmd/Validator.java b/src/main/java/de/kosit/validationtool/cmd/Validator.java index a54e3b5..b5d37fc 100644 --- a/src/main/java/de/kosit/validationtool/cmd/Validator.java +++ b/src/main/java/de/kosit/validationtool/cmd/Validator.java @@ -16,7 +16,7 @@ package de.kosit.validationtool.cmd; -import static org.apache.commons.lang3.ObjectUtils.getIfNull; +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; import static org.apache.commons.lang3.StringUtils.EMPTY; import static org.apache.commons.lang3.StringUtils.isNotEmpty; @@ -37,11 +37,14 @@ import java.util.stream.Stream; import org.fusesource.jansi.AnsiRenderer.Code; +import lombok.extern.slf4j.Slf4j; + import de.kosit.validationtool.api.Configuration; import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.InputFactory; import de.kosit.validationtool.api.Result; import de.kosit.validationtool.cmd.CommandLineOptions.CliOptions; +import de.kosit.validationtool.cmd.CommandLineOptions.Definition; import de.kosit.validationtool.cmd.CommandLineOptions.RepositoryDefinition; import de.kosit.validationtool.cmd.CommandLineOptions.ScenarioDefinition; import de.kosit.validationtool.cmd.assertions.Assertions; @@ -52,7 +55,7 @@ import de.kosit.validationtool.impl.EngineInformation; import de.kosit.validationtool.impl.Printer; import de.kosit.validationtool.impl.ScenarioRepository; import de.kosit.validationtool.impl.xml.ProcessorProvider; -import lombok.extern.slf4j.Slf4j; + import net.sf.saxon.s9api.Processor; /** @@ -129,7 +132,7 @@ public class Validator { final Processor processor = ProcessorProvider.getProcessor(); final List config = getConfiguration(cmd); final InternalCheck check = new InternalCheck(processor, config.toArray(new Configuration[0])); - final CommandLineOptions.CliOptions cliOptions = getIfNull(cmd.getCliOptions(), new CliOptions()); + final CommandLineOptions.CliOptions cliOptions = defaultIfNull(cmd.getCliOptions(), new CliOptions()); final Path outputDirectory = determineOutputDirectory(cliOptions); if (cliOptions.isExtractHtml()) { check.getCheckSteps().add(new ExtractHtmlContentAction(processor, outputDirectory)); @@ -177,19 +180,17 @@ public class Validator { * @return a list of configurations of the scenarios and repositories passed in cmd */ private static List getConfiguration(final CommandLineOptions cmd) { - final List scenarios = getIfNull(cmd.getScenarios(), Collections.emptyList()); - // Map from scenario name to scenario path + final List scenarios = defaultIfNull(cmd.getScenarios(), Collections.emptyList()); final Map mappedScenarios = scenarios.stream() .collect(Collectors.toMap(ScenarioDefinition::getName, ScenarioDefinition::getPath)); - final List repos = getIfNull(cmd.getRepositories(), Collections.emptyList()); - final Map mappedRepos = repos.stream() - .collect(Collectors.toMap(RepositoryDefinition::getName, RepositoryDefinition::getPath)); + final List repos = defaultIfNull(cmd.getRepositories(), Collections.emptyList()); + final Map mappedRepos = repos.stream().collect(Collectors.toMap(Definition::getName, Definition::getPath)); checkUnused(mappedScenarios, mappedRepos); return mappedScenarios.entrySet().stream().map(e -> { assertFileExistance(e.getValue(), "scenario"); final URI scenarioLocation = e.getValue().toUri(); - final URI repositoryLocation = findRepository(scenarioLocation, e.getKey(), mappedRepos); + final URI repositoryLocation = findRepository(e.getKey(), mappedRepos); reportLoading(scenarioLocation, repositoryLocation); final Configuration configuration = Configuration.load(scenarioLocation, repositoryLocation) @@ -207,14 +208,9 @@ public class Validator { unused.forEach(e -> Printer.writeErr("Warning: repository definition \"{0}\" is not used", e.getKey())); } - private static URI findRepository(final URI scenarioLocation, final String key, final Map repositories) { + private static URI findRepository(final String key, final Map repositories) { final Path path = repositories.getOrDefault(key, repositories.get(ScenarioRepository.DEFAULT_ID)); if (path == null) { - // If it is an unnamed scenario, use the CWD instead - if (key.startsWith(ScenarioRepository.DEFAULT)) { - // Assume directory of scenario location instead - return Paths.get(scenarioLocation).getParent().toUri(); - } throw new IllegalArgumentException(String.format("No repository location for scenario definition '%s' specified", key)); } return determineRepository(path); diff --git a/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java b/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java index adfdec3..4515d9b 100644 --- a/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java +++ b/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java @@ -32,9 +32,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import de.kosit.validationtool.impl.Helper.Simple; import lombok.extern.slf4j.Slf4j; +import de.kosit.validationtool.impl.Helper.Simple; + /** * Testet die Parameter des Kommandozeilen-Tools. * @@ -73,7 +74,7 @@ public class CommandlineApplicationTest { @Test public void testHelp() { - final String[] args = { "-?" }; + final String[] args = new String[] { "-?" }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).isEmpty(); checkForHelp(CommandLine.getOutputLines()); @@ -86,7 +87,7 @@ public class CommandlineApplicationTest { @Test public void testRequiredScenarioFile() { - final String[] args = { "arguments", "egal welche", "argumente drin sind" }; + final String[] args = new String[] { "arguments", "egal welche", "argumente drin sind" }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).isNotEmpty(); assertThat(CommandLine.getErrorOutput()).contains("Missing required option: '--scenarios"); @@ -94,7 +95,7 @@ public class CommandlineApplicationTest { @Test public void testNotExistingScenarioFile() { - final String[] args = { "-s", Paths.get(Simple.NOT_EXISTING).toString(), Paths.get(Simple.NOT_EXISTING).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.NOT_EXISTING).toString(), Paths.get(Simple.NOT_EXISTING).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).isNotEmpty(); assertThat(CommandLine.getErrorOutput()).contains("Not a valid path for scenario definition specified"); @@ -102,7 +103,7 @@ public class CommandlineApplicationTest { @Test public void testIncorrectRepository() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.NOT_EXISTING).toString(), + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.NOT_EXISTING).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).isNotEmpty(); @@ -111,8 +112,8 @@ public class CommandlineApplicationTest { @Test public void testNotExistingTestTarget() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.NOT_EXISTING).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.NOT_EXISTING).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).isNotEmpty(); assertThat(CommandLine.getErrorOutput()).contains("No test targets found"); @@ -120,24 +121,17 @@ public class CommandlineApplicationTest { @Test public void testValidMinimalConfiguration() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; - CommandLineApplication.mainProgram(args); - assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); - } - - @Test - public void testValidMinimalConfigurationWithoutRepositoryPath() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS_WITH_RELATIVE_PATHS).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); } @Test public void testValidNamingConfiguration() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "somePrefix", "--report-postfix", "somePostfix" }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "somePrefix", + "--report-postfix", "somePostfix" }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); assertThat(CommandLine.getErrorOutput()).contains("somePrefix-simple-somePostfix"); @@ -145,7 +139,7 @@ public class CommandlineApplicationTest { @Test public void testValidMultipleInput() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString(), Paths.get(Simple.FOO).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains("Processing 2 object(s) completed"); @@ -153,7 +147,7 @@ public class CommandlineApplicationTest { @Test public void testValidDirectoryInput() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.EXAMPLES).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains("Processing 8 object(s) completed"); @@ -162,7 +156,7 @@ public class CommandlineApplicationTest { @Test public void testValidOutputConfiguration() throws IOException { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); @@ -173,7 +167,8 @@ public class CommandlineApplicationTest { @Test public void testNoInput() { // assertThat(output).doesNotExist(); - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), }; CommandLineApplication.mainProgram(args); checkForHelp(CommandLine.getOutputLines()); } @@ -181,8 +176,8 @@ public class CommandlineApplicationTest { @Test public void testPrint() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-p", "-r", Paths.get(Simple.REPOSITORY_URI).toString(), "-o", - this.output.toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-p", "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), "-o", this.output.toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); assertThat(CommandLine.getOutputLines()).haveAtLeastOne(new Condition<>( @@ -191,8 +186,9 @@ public class CommandlineApplicationTest { @Test public void testHtmlExtraktion() throws IOException { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-h", "-o", this.output.toAbsolutePath().toString(), "-r", - Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-h", "-o", + this.output.toAbsolutePath().toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), + Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); assertThat(Files.list(this.output).filter(f -> f.toString().endsWith(".html")).count()).isPositive(); @@ -200,9 +196,9 @@ public class CommandlineApplicationTest { @Test public void testAssertionsExtraktion() { - final String[] args = { "-d", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), "-o", - this.output.toString(), "-c", Paths.get(ASSERTIONS).toString(), Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-d", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), "-o", this.output.toString(), "-c", Paths.get(ASSERTIONS).toString(), + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); assertThat(CommandLine.getErrorOutput()).contains("Can not find assertions for "); @@ -210,16 +206,16 @@ public class CommandlineApplicationTest { @Test public void testDebugFlag() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", "unknown", "-o", this.output.toString(), "-d", - Paths.get(ASSERTIONS).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", "unknown", "-o", this.output.toString(), + "-d", Paths.get(ASSERTIONS).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains("at de.kosit.validationtool"); } @Test public void testPrintMemoryStats() { - final String[] args = { "-m", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-m", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); assertThat(CommandLine.getErrorOutput()).contains("total"); @@ -227,7 +223,8 @@ public class CommandlineApplicationTest { @Test public void testReadFromPipe() throws IOException { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString() }; CommandLine.setStandardInput(Files.newInputStream(Paths.get(Simple.SIMPLE_VALID))); CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); @@ -235,30 +232,31 @@ public class CommandlineApplicationTest { @Test public void testAndre() throws IOException { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "andre1" }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "andre1" }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT); } @Test public void testUnexpectedDaemonFlag() { - final String[] args = { "-D", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-D", "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains("Will ignore cli mode options"); } @Test public void testParsingError() { - final String[] args = { "-s", "-r", Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-s", "-r", Paths.get(Simple.REPOSITORY_URI).toString(), + Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getErrorOutput()).contains("Expected parameter for option"); } @Test public void loadMultipleScenarios() { - final String[] args = { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", + final String[] args = new String[] { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", "s2=" + Paths.get(Simple.OTHER_SCENARIOS).toString(), "-r", "s1=" + Paths.get(Simple.REPOSITORY_URI).toString(), "-r", "s2=" + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); @@ -267,7 +265,7 @@ public class CommandlineApplicationTest { @Test public void loadMultipleScenariosSingleRepository() { - final String[] args = { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", + final String[] args = new String[] { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", "s2=" + Paths.get(Simple.OTHER_SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); @@ -276,7 +274,7 @@ public class CommandlineApplicationTest { @Test public void loadMultipleScenariosMissingRepository() { - final String[] args = { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", + final String[] args = new String[] { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-s", "s2=" + Paths.get(Simple.OTHER_SCENARIOS).toString(), "-r", "s1=" + Paths.get(Simple.REPOSITORY_URI).toString(), "-r", "typo=" + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); @@ -285,16 +283,16 @@ public class CommandlineApplicationTest { @Test public void loadMultipleOrderedScenarios() { - final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-s", Paths.get(Simple.OTHER_SCENARIOS).toString(), "-r", - Paths.get(Simple.REPOSITORY_URI).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), - Paths.get(Simple.SIMPLE_VALID).toString() }; + final String[] args = new String[] { "-s", Paths.get(Simple.SCENARIOS).toString(), "-s", + Paths.get(Simple.OTHER_SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(), "-r", + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); assertThat(CommandLine.getOutput()).contains("Processing of 1 objects completed"); } @Test public void checkUnusedRepository() { - final String[] args = { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-r", + final String[] args = new String[] { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-r", "s1=" + Paths.get(Simple.REPOSITORY_URI).toString(), "-r", "unused=" + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); @@ -304,7 +302,7 @@ public class CommandlineApplicationTest { @Test public void checkDuplicationScenarioDefinition() { - final String[] args = { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-r", + final String[] args = new String[] { "-s", "s1=" + Paths.get(Simple.SCENARIOS).toString(), "-r", "s1=" + Paths.get(Simple.REPOSITORY_URI).toString(), "-r", "unused=" + Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString() }; CommandLineApplication.mainProgram(args); diff --git a/src/test/java/de/kosit/validationtool/impl/Helper.java b/src/test/java/de/kosit/validationtool/impl/Helper.java index f60c8a1..4562fb6 100644 --- a/src/test/java/de/kosit/validationtool/impl/Helper.java +++ b/src/test/java/de/kosit/validationtool/impl/Helper.java @@ -51,18 +51,16 @@ public class Helper { public static final URI EXAMPLES = ROOT.resolve("input/"); - public static final URI SIMPLE_VALID = ROOT.resolve("input/simple.xml"); + public static final URI SIMPLE_VALID = Simple.ROOT.resolve("input/simple.xml"); - public static final URI FOO = ROOT.resolve("input/foo.xml"); + public static final URI FOO = Simple.ROOT.resolve("input/foo.xml"); public static final URI FOO_SCHEMATRON_INVALID = EXAMPLES.resolve("foo-schematron-invalid.xml"); - public static final URI REJECTED = ROOT.resolve("input/withManualReject.xml"); + public static final URI REJECTED = Simple.ROOT.resolve("input/withManualReject.xml"); public static final URI SCENARIOS = ROOT.resolve("scenarios.xml"); - public static final URI SCENARIOS_WITH_RELATIVE_PATHS = ROOT.resolve("scenarios-with-relative-paths.xml"); - public static final URI OTHER_SCENARIOS = ROOT.resolve("otherScenarios.xml"); public static final URI ERROR_SCENARIOS = ROOT.resolve("scenarios-with-errors.xml"); diff --git a/src/test/resources/examples/simple/scenarios-with-relative-paths.xml b/src/test/resources/examples/simple/scenarios-with-relative-paths.xml deleted file mode 100644 index ff2334b..0000000 --- a/src/test/resources/examples/simple/scenarios-with-relative-paths.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - HTML-TestSuite - QA - 2025-08-19 - - Szenario für Tests - - - - Simple - - Nur Schemaprüfung. - - http://www.xoev.de/de/validator/framework/1/createreportinput - - - http://validator.kosit.de/test-sample - http://validator.kosit.de/test-report - /test:simple - - - - Sample Schema - repository/simple.xsd - - - - - Sample Schematron - repository/simple.xsl - - - - - Report für eRechnung - repository/report.xsl - - - count(//test:rejected) = 0 - - - - NoAcceptMatch - - Nur Schemaprüfung. Keine AcceptMatch deklaration - Testen, ob auch alte Konfiguration funktionioeren - - http://validator.kosit.de/test-sample - /test:foo - - - Sample Schema - repository/simple.xsd - - - - - Sample Schematron - repository/simple.xsl - - - - - Report für eRechnung - repository/report.xsl - - - - - - - - default - repository/report.xsl - - - -
Szenario für Tests
Nur Schemaprüfung.
Nur Schemaprüfung. Keine AcceptMatch deklaration
Testen, ob auch alte Konfiguration funktionioeren