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
From: Marian Koncek <mkoncek@redhat.com>
Date: Mon, 4 Mar 2019 14:52:59 +0100
Subject: [PATCH] Disable tests requiring network access
---
.../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");
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
--- xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java 2018-08-21 22:03:14.000000000 +0200
+++ xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java 2020-05-15 13:40:22.050239084 +0200
@@ -43,14 +43,6 @@
}
- @Test
@Test
- public void testNodesByXPath_withNull_shouldFailed() {
-
- 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);
- }
-
@Test
- @Test
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
index cfa46ce..8031ede 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
@@ -82,47 +82,6 @@ public class XmlAssertValidationTest {
assertThat(xml).isValidAgainst(xsd);
thrown.expectAssertionError(format("%nExpecting not blank but was:<\" \n \t\">"));
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
--- xmlunit-2.7.0-src-orig/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java 2020-05-03 21:05:12.000000000 +0200
+++ xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java 2020-05-15 13:44:15.720157403 +0200
@@ -91,64 +91,12 @@
}
- @Test
@Test
- 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(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." +
- " 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();
- }
@ -61,7 +46,7 @@ index cfa46ce..8031ede 100644
- @Test
- 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();
- }
@ -73,40 +58,40 @@ index cfa46ce..8031ede 100644
- " 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"));
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
-
- assertThat(xml).isValid();
- }
-
@Test
- @Test
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();
}
-
- @Test
- 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();
- }
-
@Test
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
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
@Test
- public void testValueByXPath_withNull_shouldFailed() {
-
- 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);
- }
-
@Test
- @Test
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
index 793e26a..eb4e9fa 100644
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
@@ -76,19 +76,6 @@ public class ValidationMatcherTest {
is(valid(new StreamSource(new File("../test-resources/Book.xsd")))));
thrown.expectAssertionError(format("%nExpecting not blank but was:<\" \n \t\">"));
Nur in xmlunit-2.7.0-src/xmlunit-assertj/src/test/java/org/xmlunit/assertj: XmlAssertValueByXPathTest.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
--- xmlunit-2.7.0-src-orig/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java 2019-12-31 14:00:54.000000000 +0100
+++ xmlunit-2.7.0-src/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java 2020-05-15 13:49:17.980758207 +0200
@@ -78,19 +78,6 @@
is(valid(new StreamSource(new File(TestResources.BOOK_XSD)))));
}
- @Test
@ -133,14 +119,12 @@ index 793e26a..eb4e9fa 100644
- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
- false);
- }
- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")),
- assertThat(new StreamSource(new File(TEST_RESOURCE_DIR + "BookXsdGenerated.xml")),
- is(new ValidationMatcher()));
-
- }
-
@Test(expected = AssertionError.class)
public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")),
--
2.20.1
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~.

View File

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