Compare commits

...

No commits in common. "c8-beta-stream-202201" and "c8-stream-201902" have entirely different histories.

7 changed files with 190 additions and 276 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/xmlunit-2.6.3-src.tar.gz

View File

@ -1,2 +1 @@
8bf8c0225498885dc6e47fb284819acd1cf55614 SOURCES/generate-tarball.sh 19d9c8df1d4645d59e15a27e978370964fd45030 SOURCES/xmlunit-2.6.3-src.tar.gz
be39d0bab77de816ae04be6d2f58cef6138f0461 SOURCES/xmlunit-2.8.2.tar.gz

View File

@ -1,183 +1,146 @@
From 81808e548ddc6cf0a3cc12285f48caa2bd517a07 Mon Sep 17 00:00:00 2001 From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com> From: Marian Koncek <mkoncek@redhat.com>
Date: Mon, 4 Mar 2019 14:52:59 +0100 Date: Mon, 4 Mar 2019 14:52:59 +0100
Subject: [PATCH 1/3] Disable tests requiring network access Subject: [PATCH 1/4] Disable tests requiring network access
--- ---
.../org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++ .../assertj/XmlAssertNodesByXPathTest.java | 8 ---
.../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++ .../assertj/XmlAssertValidationTest.java | 51 -------------------
.../org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++ .../assertj/XmlAssertValueByXPathTest.java | 8 ---
.../org/custommonkey/xmlunit/test_AbstractNodeTester.java | 2 +- .../matchers/ValidationMatcherTest.java | 13 -----
.../org/custommonkey/xmlunit/test_DifferenceEngine.java | 2 +- 4 files changed, 80 deletions(-)
.../org/custommonkey/xmlunit/test_NewDifferenceEngine.java | 2 +-
.../test/java/org/custommonkey/xmlunit/test_Validator.java | 2 +-
.../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++
8 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
index 166633e..926c647 100644 index 6499f67..71267c3 100644
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
@@ -13,6 +13,7 @@ @@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest {
*/ assertThat(null).nodesByXPath("//foo");
package org.xmlunit.assertj3;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -43,6 +44,7 @@ public void testAssertThat_withNull_shouldFailed() {
} }
- @Test
- public void testNodesByXPath_withNull_shouldFailed() {
-
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
-
- assertThat("<a><b></b><c/></a>").nodesByXPath(null);
- }
-
@Test @Test
+ @Ignore public void testNodesByXPath_withWhitespacesOnly_shouldFailed() {
public void testNodesByXPath_withNull_shouldFailed() {
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>")); diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java index cfa46ce..8031ede 100644
index d4f1e82..027e7e9 100644 --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java @@ -82,47 +82,6 @@ public class XmlAssertValidationTest {
@@ -14,6 +14,7 @@ assertThat(xml).isValidAgainst(xsd);
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.TestResources;
@@ -91,6 +92,7 @@ public void testIsValidAgainst_withBrokenXml_shouldFailed() {
} }
- @Test
- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isValidAgainst();
- assertThat(xml).isValidAgainst(new Object[0]);
- }
-
- @Test
- public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
-
- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
-
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
-
- assertThat(xml).isValidAgainst();
- }
-
- @Test
- public void testIsValid_shouldPass() {
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isValid();
- }
-
- @Test
- public void testIsValid_withBrokenXml_shouldPass() {
-
- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
-
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
-
- assertThat(xml).isValid();
- }
-
@Test @Test
+ @Ignore public void testIsInvalid_withBrokenXml_shouldPass() {
public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml")); @@ -131,16 +90,6 @@ public class XmlAssertValidationTest {
@@ -100,6 +102,7 @@ public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { assertThat(xml).isInvalid();
} }
- @Test
- public void testIsInvalid_shouldField() {
-
- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid");
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isInvalid();
- }
-
@Test @Test
+ @Ignore public void testIsValidAgainst_withNullSchemaSources_shouldFailed() {
public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
@@ -112,6 +115,7 @@ public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() index 4aaf96b..d3a9cdd 100644
} --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
@@ -25,14 +25,6 @@ public class XmlAssertValueByXPathTest {
@Rule
public ExpectedException thrown = none();
- @Test
- public void testValueByXPath_withNull_shouldFailed() {
-
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
-
- assertThat("<a><b></b><c/></a>").valueByXPath(null);
- }
-
@Test @Test
+ @Ignore public void testValueByXPath_withWhitespacesOnly_shouldFailed() {
public void testIsValid_shouldPass() {
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
@@ -120,6 +124,7 @@ public void testIsValid_shouldPass() {
}
@Test
+ @Ignore
public void testIsValid_withBrokenXml_shouldPass() {
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
@@ -140,6 +145,7 @@ public void testIsInvalid_withBrokenXml_shouldPass() {
}
@Test
+ @Ignore
public void testIsInvalid_shouldField() {
thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
index 7ac9a3f..3cb825b 100644
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
@@ -14,6 +14,7 @@
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.assertj3.util.SetEnglishLocaleRule;
@@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest {
public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule();
@Test
+ @Ignore
public void testValueByXPath_withNull_shouldFailed() {
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
index 3a8ac80..df02659 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
@@ -176,7 +176,7 @@ public void testTextNode() {
}
// never called as NodeTest directly jumps to the document element
- public void testDocumentType() throws Exception {
+ public void no_testDocumentType() throws Exception {
AbstractNodeTester t = new AbstractNodeTester() { };
DocumentType n = XMLUnit
.buildControlDocument("<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
index 344d66c..35220b8 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
@@ -1020,7 +1020,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement()
listener.different);
}
- public void testDoctypeDifferences() throws Exception {
+ public void no_testDoctypeDifferences() throws Exception {
String control = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>"
+ "<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
+ "<Book/>";
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
index 0e23767..526be89 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
@@ -567,7 +567,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement()
listener.different);
}
- public void testDoctypeDifferences() throws Exception {
+ public void no_testDoctypeDifferences() throws Exception {
String control = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>"
+ "<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
+ "<Book/>";
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
index ad63592..cfcc5e2 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
@@ -57,7 +57,7 @@ public class test_Validator extends XMLTestCase {
private Validator validator;
private File tempDTDFile;
- public void testXSchema() throws Exception{
+ public void no_testXSchema() throws Exception{
File xsdFile = new File(test_Constants.TEST_RESOURCE_DIR + "Book.xsd");
assertTrue("xsdFile " + xsdFile.getAbsolutePath() + " exists",
xsdFile.exists());
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
index 6f26927..bf9a153 100644 index 793e26a..eb4e9fa 100644
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java --- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java +++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
@@ -13,6 +13,7 @@ @@ -76,19 +76,6 @@ public class ValidationMatcherTest {
*/ is(valid(new StreamSource(new File("../test-resources/Book.xsd")))));
package org.xmlunit.matchers;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -79,6 +80,7 @@ public void shouldThrowOnBrokenInstance() {
} }
@Test - @Test
+ @Ignore - public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() { - try {
try { - Class.forName("java.nio.file.FileSystem");
Class.forName("java.nio.file.FileSystem"); - } catch (Throwable t) {
- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
- false);
- }
- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")),
- is(new ValidationMatcher()));
-
- }
-
@Test(expected = AssertionError.class)
public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")),
-- --
2.35.1 2.21.0

View File

@ -1,7 +1,7 @@
From 8d7373f5feef927514339fe42919873836c0f710 Mon Sep 17 00:00:00 2001 From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com> From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 29 Aug 2019 13:58:24 +0200 Date: Thu, 29 Aug 2019 13:58:24 +0200
Subject: [PATCH 2/3] Port to hamcrest 2.1 Subject: [PATCH 2/4] Port to hamcrest 2.1
--- ---
.../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 --- .../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 ---
@ -15,7 +15,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.
index 6452081..226399c 100644 index 6452081..226399c 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
@@ -33,7 +33,6 @@ @@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate;
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -23,7 +23,7 @@ index 6452081..226399c 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@@ -112,7 +111,6 @@ private CompareMatcher(Object control) { @@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
* <p> * <p>
* As input all types are supported which are supported by {@link Input#from(Object)}. * As input all types are supported which are supported by {@link Input#from(Object)}.
*/ */
@ -31,7 +31,7 @@ index 6452081..226399c 100644
public static CompareMatcher isIdenticalTo(final Object control) { public static CompareMatcher isIdenticalTo(final Object control) {
return new CompareMatcher(control).checkForIdentical(); return new CompareMatcher(control).checkForIdentical();
} }
@@ -128,7 +126,6 @@ public static CompareMatcher isIdenticalTo(final Object control) { @@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
* <p> * <p>
* As input all types are supported which are supported by {@link Input#from(Object)}. * As input all types are supported which are supported by {@link Input#from(Object)}.
*/ */
@ -43,7 +43,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMa
index 6eb23e5..1e9b8b5 100644 index 6eb23e5..1e9b8b5 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
@@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@ package org.xmlunit.matchers;
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -51,7 +51,7 @@ index 6eb23e5..1e9b8b5 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xmlunit.builder.Input; import org.xmlunit.builder.Input;
@@ -93,7 +92,6 @@ public EvaluateXPathMatcher(String xPath, Matcher<String> valueMatcher) { @@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher<Object> {
* @param valueMatcher matcher for the value at the specified xpath * @param valueMatcher matcher for the value at the specified xpath
* @return the xpath matcher * @return the xpath matcher
*/ */
@ -63,7 +63,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher
index 08325cd..6fbf0ac 100644 index 08325cd..6fbf0ac 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
@@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@ package org.xmlunit.matchers;
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -71,7 +71,7 @@ index 08325cd..6fbf0ac 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xmlunit.builder.Input; import org.xmlunit.builder.Input;
@@ -135,7 +134,6 @@ public void describeMismatch(Object item, Description mismatchDescription) { @@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher<Object> {
* @param xPath the target xpath * @param xPath the target xpath
* @return the xpath matcher * @return the xpath matcher
*/ */
@ -91,7 +91,7 @@ index b9002a1..7cd6843 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher; import org.hamcrest.TypeSafeMatcher;
@@ -128,7 +127,6 @@ private T nullSafeConvert(String item) { @@ -128,7 +127,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the BigDecimal matcher * @return the BigDecimal matcher
*/ */
@ -99,7 +99,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal> valueMatcher) { public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal> valueMatcher) {
return new BigDecimalTypeMatcher(valueMatcher); return new BigDecimalTypeMatcher(valueMatcher);
} }
@@ -146,7 +144,6 @@ public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal> @@ -146,7 +144,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Double matcher * @return the Double matcher
*/ */
@ -107,7 +107,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatcher) { public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatcher) {
return new DoubleTypeMatcher(valueMatcher); return new DoubleTypeMatcher(valueMatcher);
} }
@@ -164,7 +161,6 @@ public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatche @@ -164,7 +161,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Integer matcher * @return the Integer matcher
*/ */
@ -115,7 +115,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher) { public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher) {
return new IntegerTypeMatcher(valueMatcher); return new IntegerTypeMatcher(valueMatcher);
} }
@@ -182,7 +178,6 @@ public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher @@ -182,7 +178,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Boolean matcher * @return the Boolean matcher
*/ */
@ -127,7 +127,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatch
index 3126349..51f58ec 100644 index 3126349..51f58ec 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem;
import org.xmlunit.validation.ValidationResult; import org.xmlunit.validation.ValidationResult;
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -135,7 +135,7 @@ index 3126349..51f58ec 100644
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.validation.Schema; import javax.xml.validation.Schema;
@@ -121,7 +120,6 @@ public void describeMismatch(final Object item, final Description mismatchDescri @@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher {
} }
} }
@ -143,7 +143,7 @@ index 3126349..51f58ec 100644
public static ValidationMatcher valid(final Object schemaSource) { public static ValidationMatcher valid(final Object schemaSource) {
return new ValidationMatcher(schemaSource); return new ValidationMatcher(schemaSource);
} }
@@ -129,7 +127,6 @@ public static ValidationMatcher valid(final Object schemaSource) { @@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher {
/** /**
* @since XMLUnit 2.3.0 * @since XMLUnit 2.3.0
*/ */
@ -152,5 +152,5 @@ index 3126349..51f58ec 100644
return new ValidationMatcher(schema); return new ValidationMatcher(schema);
} }
-- --
2.35.1 2.21.0

View File

@ -0,0 +1,25 @@
From 2aa7002c9ff0d6226ff75048dd3cee15a180dd99 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 16 Oct 2019 09:32:19 +0200
Subject: [PATCH 3/4] Fix test failure
---
.../src/test/java/org/xmlunit/assertj/ValueAssertTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
index d1e3545..5078360 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
@@ -224,7 +224,7 @@ public class ValueAssertTest {
@Test
public void testIsEqualTo_withAttributeValueExpression_shouldFailed() {
- thrown.expectAssertionError("expected:<\"[something]\"> but was:<\"[abc]\">");
+ thrown.expectAssertionError("Expecting:\n <\"abc\">\nto be equal to:\n <\"something\">\nbut was not.");
String xml = "<a><b attr=\"abc\"></b></a>";
--
2.21.0

View File

@ -1,7 +1,7 @@
From 4b30dd33332f79c71697c8a9bdbf39d74fb06c4a Mon Sep 17 00:00:00 2001 From 9866f331db726db0ac6af64649c308b01b34ea56 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 5 Nov 2019 12:14:08 +0100 Date: Tue, 5 Nov 2019 12:14:08 +0100
Subject: [PATCH 3/3] Drop support for JAXB Subject: [PATCH 4/4] Drop support for JAXB
--- ---
xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++-- xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++--
@ -9,10 +9,10 @@ Subject: [PATCH 3/3] Drop support for JAXB
2 files changed, 2 insertions(+), 9 deletions(-) 2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
index 27d9c5a..81165cc 100644 index 5321ff7..2b13cac 100644
--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java --- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
+++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
@@ -153,8 +153,8 @@ public static Builder from(Object object) { @@ -150,8 +150,8 @@ public class Input {
/** /**
* Build a Source from a Jaxb-Object. * Build a Source from a Jaxb-Object.
*/ */
@ -24,10 +24,10 @@ index 27d9c5a..81165cc 100644
/** /**
diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
index e767f38..98e3fe7 100644 index 83ff38a..fac270d 100644
--- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java --- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
+++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
@@ -31,7 +31,6 @@ @@ -31,7 +31,6 @@ import org.w3c.dom.Document;
import org.xmlunit.NullNode; import org.xmlunit.NullNode;
import org.xmlunit.TestResources; import org.xmlunit.TestResources;
import org.xmlunit.XMLUnitException; import org.xmlunit.XMLUnitException;
@ -35,7 +35,7 @@ index e767f38..98e3fe7 100644
import org.xmlunit.util.Convert; import org.xmlunit.util.Convert;
import org.xmlunit.xpath.JAXPXPathEngine; import org.xmlunit.xpath.JAXPXPathEngine;
@@ -132,10 +131,6 @@ private static Document parse(Source s) throws Exception { @@ -148,10 +147,6 @@ public class InputTest {
allIsWellFor(s, "furry"); allIsWellFor(s, "furry");
} }
@ -46,15 +46,15 @@ index e767f38..98e3fe7 100644
@Test public void shouldParseUnknownToSource() throws Exception { @Test public void shouldParseUnknownToSource() throws Exception {
// from Source // from Source
allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build()); allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build());
@@ -153,8 +148,6 @@ private static Document parse(Source s) throws Exception { @@ -169,8 +164,6 @@ public class InputTest {
allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build()); allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build());
// from URL // from URL
allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build()); allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build());
- // from Jaxb-Object - // from Jaxb-Object
- allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode"); - allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode");
// from InputStream // from InputStream
try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) { FileInputStream is = null;
allIsWellFor(Input.from(is).build()); try {
-- --
2.35.1 2.21.0

View File

@ -1,36 +1,27 @@
%bcond_with bootstrap
Name: xmlunit Name: xmlunit
Version: 2.8.2 Version: 2.6.3
Release: 8%{?dist} Release: 2%{?dist}
Summary: Provides classes to do asserts on xml Summary: Provides classes to do asserts on xml
# The whole package is ASL 2.0 except for xmlunit-legacy which is BSD # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD
License: ASL 2.0 and BSD License: ASL 2.0 and BSD
Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz
URL: https://www.xmlunit.org/ URL: https://www.xmlunit.org/
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
# Remove bundled binaries which cannot be easily verified for licensing
Source1: generate-tarball.sh
Patch1: 0001-Disable-tests-requiring-network-access.patch Patch1: 0001-Disable-tests-requiring-network-access.patch
Patch2: 0002-Port-to-hamcrest-2.1.patch Patch2: 0002-Port-to-hamcrest-2.1.patch
Patch3: 0003-Drop-support-for-JAXB.patch Patch3: 0003-Fix-test-failure.patch
Patch4: 0004-Drop-support-for-JAXB.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.assertj:assertj-core)
BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-core)
BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: mvn(org.mockito:mockito-core)
%endif
BuildArch: noarch
%description %description
XMLUnit provides you with the tools to verify the XML you emit is the one you XMLUnit provides you with the tools to verify the XML you emit is the one you
@ -78,25 +69,20 @@ This package provides %{summary}.
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
# This test failure showed up after updating mockito to 3.X, but the error
# message clearly points to assertj-core
%patch3 -p1 %patch3 -p1
%patch4 -p1
# Tests compare the string constent of thrown exceptions
# and we use a different version of assertj
find xmlunit-assertj3/src/test -name '*.java' -exec sed -i 's/\(Expecting not blank but was:\)<\(.*\)>/\1 \2/' {} +
sed -i 's/\(expected:\)<\\"\[\(something\)\]\\"> but was:<\\"\[\(abc\)\]\\">/\1 \\"\2\\"\\nbut was : \\"\3\\"/' xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/ValueAssertTest.java
%pom_disable_module xmlunit-assertj
%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin
%pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin -r :maven-shade-plugin
%mvn_alias org.xmlunit:xmlunit-legacy xmlunit:xmlunit %mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit"
%mvn_alias org.xmlunit:xmlunit-assertj3 org.xmlunit:xmlunit-assertj
# JAXB and JAF are not available in JDK11 # JAXB and JAF are not available in JDK11
%pom_remove_dep org.glassfish.jaxb: xmlunit-core %pom_remove_dep javax.activation:* xmlunit-core
%pom_remove_dep jakarta.xml.bind: xmlunit-core %pom_remove_dep javax.xml.bind:* xmlunit-core
%pom_remove_dep com.sun.xml.bind:* xmlunit-core
rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java} rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java}
%build %build
@ -110,76 +96,16 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.
%license LICENSE %license LICENSE
%files javadoc -f .mfiles-javadoc %files javadoc -f .mfiles-javadoc
%files assertj -f .mfiles-xmlunit-assertj3 %files assertj -f .mfiles-xmlunit-assertj
%files core -f .mfiles-xmlunit-core %files core -f .mfiles-xmlunit-core
%files legacy -f .mfiles-xmlunit-legacy %files legacy -f .mfiles-xmlunit-legacy
%files matchers -f .mfiles-xmlunit-matchers %files matchers -f .mfiles-xmlunit-matchers
%files placeholders -f .mfiles-xmlunit-placeholders %files placeholders -f .mfiles-xmlunit-placeholders
%changelog %changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 22 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-7
- Disable more tests that require network access
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.8.2-6
- Rebuilt for java-17-openjdk as system jdk
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 18 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-3
- Clean tarball from content with questionable licensing
- Resolves: rhbz#1973721
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-2
- Bootstrap build
- Non-bootstrap build
* Thu Feb 04 2021 Merlin Mathesius <mmathesi@redhat.com> - 0:2.7.0-7
- Update previous patch to use improved version that was merged upstream
* Fri Jan 29 2021 Merlin Mathesius <mmathesi@redhat.com> - 0:2.7.0-6
- Fix FTBFS by patching ValueAssertTest to adjust for changed format of
mismatched string exception
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 26 2021 Marian Koncek <mkoncek@redhat.com> - 2.8.2-1
- Update to upstream version 2.8.2
* Wed Jul 29 2020 Marian Koncek <mkoncek@redhat.com> - 2.7.0-1
- Update to upstream version 2.7.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 20 2020 Mat Booth <mat.booth@redhat.com> - 0:2.7.0-3
- Allow building against JDK 11
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0:2.7.0-2
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed May 13 2020 Dr. Tilmann Bubeck <bubeck@fedoraproject.org> - 0:2.7.0-1
- Update to version 2.7.0.
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.6.3-2 * Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.6.3-2
- Mass rebuild for javapackages-tools 201902 - Mass rebuild for javapackages-tools 201902
* Mon Jul 29 2019 Fabio Valentini <decathorpe@gmail.com> - 0:2.6.3-1
- Update to version 2.6.3.
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jun 26 2019 Marian Koncek <mkoncek@redhat.com> - 2.6.3-1 * Wed Jun 26 2019 Marian Koncek <mkoncek@redhat.com> - 2.6.3-1
- Update to upstream version 2.6.3 - Update to upstream version 2.6.3