Update to upstream version 2.8.2

This commit is contained in:
Marian Koncek 2021-01-28 15:00:57 +01:00
parent 5376222dcf
commit d6d2b054fc
7 changed files with 42 additions and 88 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ xmlunit-1.3-src.zip
/xmlunit-2.6.2-src.tar.gz
/xmlunit-2.6.3-src.tar.gz
/xmlunit-2.7.0-src.tar.gz
/xmlunit-2.8.2-src.tar.gz

View File

@ -4,19 +4,19 @@ Date: Mon, 4 Mar 2019 14:52:59 +0100
Subject: [PATCH 1/4] Disable tests requiring network access
---
.../java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java | 2 ++
.../java/org/xmlunit/assertj/XmlAssertValidationTest.java | 6 ++++++
.../java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java | 2 ++
.../java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++
.../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++
.../java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++
.../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++
4 files changed, 12 insertions(+)
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
index 6499f67..c465a51 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
@@ -13,6 +13,7 @@
*/
package org.xmlunit.assertj;
package org.xmlunit.assertj3;
+import org.junit.Ignore;
import org.junit.Rule;
@ -30,12 +30,12 @@ index 6499f67..c465a51 100644
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 7e2dc0e..f743cc4 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
@@ -14,6 +14,7 @@
package org.xmlunit.assertj;
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
@ -82,18 +82,18 @@ index 7e2dc0e..f743cc4 100644
public void testIsInvalid_shouldField() {
thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
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 3ce5284..63c3db0 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
--- 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.assertj;
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.assertj.util.SetEnglishLocaleRule;
import org.xmlunit.assertj3.util.SetEnglishLocaleRule;
@@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest {
public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule();

View File

@ -9,10 +9,10 @@ Subject: [PATCH 4/4] Drop support for JAXB
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
index 5321ff7..2b13cac 100644
index 27d9c5a..81165cc 100644
--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
+++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
@@ -150,8 +150,8 @@ public class Input {
@@ -153,8 +153,8 @@ public class Input {
/**
* Build a Source from a Jaxb-Object.
*/
@ -24,7 +24,7 @@ index 5321ff7..2b13cac 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
index 83ff38a..fac270d 100644
index e767f38..98e3fe7 100644
--- a/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 @@ import org.w3c.dom.Document;
@ -35,7 +35,7 @@ index 83ff38a..fac270d 100644
import org.xmlunit.util.Convert;
import org.xmlunit.xpath.JAXPXPathEngine;
@@ -148,10 +147,6 @@ public class InputTest {
@@ -132,10 +131,6 @@ public class InputTest {
allIsWellFor(s, "furry");
}
@ -46,15 +46,15 @@ index 83ff38a..fac270d 100644
@Test public void shouldParseUnknownToSource() throws Exception {
// from Source
allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build());
@@ -169,8 +164,6 @@ public class InputTest {
@@ -153,8 +148,6 @@ public class InputTest {
allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build());
// from URL
allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build());
- // from Jaxb-Object
- allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode");
// from InputStream
FileInputStream is = null;
try {
try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) {
allIsWellFor(Input.from(is).build());
--
2.21.0
2.29.2

View File

@ -1,25 +0,0 @@
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,25 +0,0 @@
From 756086b87081019f4ed1720bded0a92fc79a2794 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 22 Jan 2021 16:51:55 +0100
Subject: [PATCH] Port to assertj 3.18.1
---
.../src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java
index 4d56aa5..a6b27c4 100644
--- a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java
+++ b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java
@@ -58,7 +58,7 @@ abstract class CustomAbstractAssert<SELF extends CustomAbstractAssert<SELF, ACTU
assertionError.setStackTrace(newStackTrace);
}
- private boolean isElementOfCustomAssert(StackTraceElement stackTraceElement) {
+ protected boolean isElementOfCustomAssert(StackTraceElement stackTraceElement) {
Class<?> currentAssertClass = getClass();
while (currentAssertClass != AbstractAssert.class) {
--
2.29.2

View File

@ -1 +1 @@
SHA512 (xmlunit-2.7.0-src.tar.gz) = 888e13165962d1a3906236e760fccd28cb7053f962a34da58d8c3b9305cd1a610aca7be19f7fca9fec69ef4be4cb5e2a8355a0c43f27c14d6d3b693e1a0f8d6e
SHA512 (xmlunit-2.8.2-src.tar.gz) = 6d6caff75e21829c6e37777e7b37a6d9cdd6b03efb04866884b1b7630c0de584c78321b1f1145bdb47da7afeabb69ec81fa9ff980c41382c360572ef858df507

View File

@ -1,5 +1,5 @@
Name: xmlunit
Version: 2.7.0
Version: 2.8.2
Release: 1%{?dist}
Summary: Provides classes to do asserts on xml
# The whole package is ASL 2.0 except for xmlunit-legacy which is BSD
@ -9,9 +9,7 @@ URL: https://www.xmlunit.org/
Patch1: 0001-Disable-tests-requiring-network-access.patch
Patch2: 0002-Port-to-hamcrest-2.1.patch
Patch3: 0003-Fix-test-failure.patch
Patch4: 0004-Drop-support-for-JAXB.patch
Patch5: 0005-Port-to-assertj-3.18.1.patch
Patch3: 0003-Drop-support-for-JAXB.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
@ -70,23 +68,25 @@ This package provides %{summary}.
%patch1 -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
%patch4 -p1
%patch5 -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 :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
%pom_remove_dep javax.activation:* xmlunit-core
%pom_remove_dep javax.xml.bind:* xmlunit-core
%pom_remove_dep com.sun.xml.bind:* xmlunit-core
%pom_remove_dep org.glassfish.jaxb: xmlunit-core
%pom_remove_dep jakarta.xml.bind: xmlunit-core
rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java}
%build
@ -100,13 +100,16 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.
%license LICENSE
%files javadoc -f .mfiles-javadoc
%files assertj -f .mfiles-xmlunit-assertj
%files assertj -f .mfiles-xmlunit-assertj3
%files core -f .mfiles-xmlunit-core
%files legacy -f .mfiles-xmlunit-legacy
%files matchers -f .mfiles-xmlunit-matchers
%files placeholders -f .mfiles-xmlunit-placeholders
%changelog
* 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