From d503655e6284be7795fdc22b0b29a53c66192945 Mon Sep 17 00:00:00 2001 From: pigelvy Date: Wed, 15 Feb 2023 11:44:46 +0100 Subject: [PATCH] Unit tests for XSLT 2.0 Shouldn't the tests `extParamForXSLT20` and `newSchematronForXSLT20` use the file `simpleSchema20`? Just so you know, I was browsing your code and I'm proposing this change as a mean for discussion. I might be wrong but, at first sight, this seems like a copy/paste mistake. --- src/test/java/name/dmaus/schxslt/SchematronTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/name/dmaus/schxslt/SchematronTest.java b/src/test/java/name/dmaus/schxslt/SchematronTest.java index 9f18342..d59547c 100644 --- a/src/test/java/name/dmaus/schxslt/SchematronTest.java +++ b/src/test/java/name/dmaus/schxslt/SchematronTest.java @@ -78,12 +78,12 @@ public void extParamForXSLT10 () throws Exception @Test public void extParamForXSLT20 () throws Exception { - Schematron schematron = new Schematron(getResourceAsStream(simpleSchema10), "external-param"); + Schematron schematron = new Schematron(getResourceAsStream(simpleSchema20), "external-param"); HashMap map = new HashMap(); map.put("external-param", new Integer(1)); - Result result = schematron.validate(getResourceAsStream(simpleSchema10), map); + Result result = schematron.validate(getResourceAsStream(simpleSchema20), map); assertTrue(result.isValid()); } @@ -92,7 +92,7 @@ public void extParamForXSLT20 () throws Exception public void newSchematronForXSLT20 () throws Exception { Schematron schematron = new Schematron(getResourceAsStream(simpleSchema20), "always-valid"); - Result result = schematron.validate(getResourceAsStream(simpleSchema10)); + Result result = schematron.validate(getResourceAsStream(simpleSchema20)); assertTrue(result.isValid()); }