Update to xmlunit-2.7.0

This commit is contained in:
Dr. Tilmann Bubeck 2020-05-15 13:54:16 +02:00
parent 70335595fd
commit 4c8bbc4139
2 changed files with 47 additions and 61 deletions

View File

@ -1,24 +1,10 @@
From 72b14aa3c437984f15e026aeb3976de978e19436 Mon Sep 17 00:00:00 2001 diff -r -u xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
From: Marian Koncek <mkoncek@redhat.com> --- xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java 2018-08-21 22:03:14.000000000 +0200
Date: Mon, 4 Mar 2019 14:52:59 +0100 +++ xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java 2020-05-15 13:40:22.050239084 +0200
Subject: [PATCH] Disable tests requiring network access @@ -43,14 +43,6 @@
---
.../assertj/XmlAssertNodesByXPathTest.java | 8 ---
.../assertj/XmlAssertValidationTest.java | 51 -------------------
.../assertj/XmlAssertValueByXPathTest.java | 8 ---
.../matchers/ValidationMatcherTest.java | 13 -----
4 files changed, 80 deletions(-)
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 6499f67..71267c3 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
@@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest {
assertThat(null).nodesByXPath("//foo");
} }
- @Test @Test
- public void testNodesByXPath_withNull_shouldFailed() { - public void testNodesByXPath_withNull_shouldFailed() {
- -
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>")); - thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
@ -26,21 +12,20 @@ index 6499f67..71267c3 100644
- assertThat("<a><b></b><c/></a>").nodesByXPath(null); - assertThat("<a><b></b><c/></a>").nodesByXPath(null);
- } - }
- -
@Test - @Test
public void testNodesByXPath_withWhitespacesOnly_shouldFailed() { public void testNodesByXPath_withWhitespacesOnly_shouldFailed() {
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java thrown.expectAssertionError(format("%nExpecting not blank but was:<\" \n \t\">"));
index cfa46ce..8031ede 100644 diff -r -u xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java --- xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java 2020-05-03 21:05:12.000000000 +0200
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +++ xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java 2020-05-15 13:44:15.720157403 +0200
@@ -82,47 +82,6 @@ public class XmlAssertValidationTest { @@ -91,64 +91,12 @@
assertThat(xml).isValidAgainst(xsd);
} }
- @Test @Test
- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { - public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
- -
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); - StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
- -
- assertThat(xml).isValidAgainst(); - assertThat(xml).isValidAgainst();
- assertThat(xml).isValidAgainst(new Object[0]); - assertThat(xml).isValidAgainst(new Object[0]);
@ -53,7 +38,7 @@ index cfa46ce..8031ede 100644
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + - " 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."); - " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
- -
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); - StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
- -
- assertThat(xml).isValidAgainst(); - assertThat(xml).isValidAgainst();
- } - }
@ -61,7 +46,7 @@ index cfa46ce..8031ede 100644
- @Test - @Test
- public void testIsValid_shouldPass() { - public void testIsValid_shouldPass() {
- -
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); - StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
- -
- assertThat(xml).isValid(); - assertThat(xml).isValid();
- } - }
@ -73,40 +58,40 @@ index cfa46ce..8031ede 100644
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + - " 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."); - " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
- -
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); - StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
- -
- assertThat(xml).isValid(); - assertThat(xml).isValid();
- } - }
- -
@Test - @Test
public void testIsInvalid_withBrokenXml_shouldPass() { public void testIsInvalid_withBrokenXml_shouldPass() {
@@ -131,16 +90,6 @@ public class XmlAssertValidationTest { StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
assertThat(xml).isInvalid(); assertThat(xml).isInvalid();
} }
-
- @Test - @Test
- public void testIsInvalid_shouldField() { - public void testIsInvalid_shouldField() {
- -
- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid"); - thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
- + Pattern.quote(TestResources.TEST_RESOURCE_DIR) + "BookXsdGenerated.xml>\\nto be invalid");
- -
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); - StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
- -
- assertThat(xml).isInvalid(); - assertThat(xml).isInvalid();
- } - }
-
@Test @Test
public void testIsValidAgainst_withNullSchemaSources_shouldFailed() { public void testIsValidAgainst_withNullSchemaSources_shouldFailed() {
Nur in xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj: XmlAssertValidationTest.java~.
diff -r -u xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
--- xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java 2020-04-28 10:10:30.000000000 +0200
+++ xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java 2020-05-15 13:47:13.361335083 +0200
@@ -31,14 +31,6 @@
public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule();
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java @Test
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() { - public void testValueByXPath_withNull_shouldFailed() {
- -
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>")); - thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
@ -114,15 +99,16 @@ index 4aaf96b..d3a9cdd 100644
- assertThat("<a><b></b><c/></a>").valueByXPath(null); - assertThat("<a><b></b><c/></a>").valueByXPath(null);
- } - }
- -
@Test - @Test
public void testValueByXPath_withWhitespacesOnly_shouldFailed() { public void testValueByXPath_withWhitespacesOnly_shouldFailed() {
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java thrown.expectAssertionError(format("%nExpecting not blank but was:<\" \n \t\">"));
index 793e26a..eb4e9fa 100644 Nur in xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj: XmlAssertValueByXPathTest.java~.
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java diff -r -u xmlunit-2.7.0-src-orig/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java xmlunit-2.7.0-src/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java --- xmlunit-2.7.0-src-orig/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java 2019-12-31 14:00:54.000000000 +0100
@@ -76,19 +76,6 @@ public class ValidationMatcherTest { +++ xmlunit-2.7.0-src/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java 2020-05-15 13:49:17.980758207 +0200
is(valid(new StreamSource(new File("../test-resources/Book.xsd"))))); @@ -78,19 +78,6 @@
is(valid(new StreamSource(new File(TestResources.BOOK_XSD)))));
} }
- @Test - @Test
@ -133,14 +119,12 @@ index 793e26a..eb4e9fa 100644
- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate", - assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
- false); - false);
- } - }
- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")), - assertThat(new StreamSource(new File(TEST_RESOURCE_DIR + "BookXsdGenerated.xml")),
- is(new ValidationMatcher())); - is(new ValidationMatcher()));
- -
- } - }
- -
@Test(expected = AssertionError.class) @Test(expected = AssertionError.class)
public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() { public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")), assertThat(new StreamSource(new File(TEST_RESOURCE_DIR + "invalidBook.xml")),
-- Nur in xmlunit-2.7.0-src/xmlunit-matchers/src/test/java/org/xmlunit/matchers: ValidationMatcherTest.java~.
2.20.1

View File

@ -31,8 +31,8 @@
Name: xmlunit Name: xmlunit
Summary: Provides classes to do asserts on xml Summary: Provides classes to do asserts on xml
Epoch: 0 Epoch: 0
Version: 2.6.3 Version: 2.7.0
Release: 2%{?dist} Release: 1%{?dist}
# xmlunit2 is licensed under ASL 2.0, xmlunit-legacy is still BSD-licensed # xmlunit2 is licensed under ASL 2.0, xmlunit-legacy is still BSD-licensed
License: ASL 2.0 and BSD License: ASL 2.0 and BSD
@ -114,7 +114,6 @@ This package provides %{summary}.
%build %build
%mvn_build -s %mvn_build -s
%install %install
%mvn_install %mvn_install
@ -132,6 +131,9 @@ This package provides %{summary}.
%changelog %changelog
* 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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild