Blame SOURCES/0001-Disable-tests-requiring-network-access.patch

d8391e
From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001
d8391e
From: Marian Koncek <mkoncek@redhat.com>
d8391e
Date: Mon, 4 Mar 2019 14:52:59 +0100
d8391e
Subject: [PATCH 1/4] Disable tests requiring network access
d8391e
d8391e
---
d8391e
 .../assertj/XmlAssertNodesByXPathTest.java    |  8 ---
d8391e
 .../assertj/XmlAssertValidationTest.java      | 51 -------------------
d8391e
 .../assertj/XmlAssertValueByXPathTest.java    |  8 ---
d8391e
 .../matchers/ValidationMatcherTest.java       | 13 -----
d8391e
 4 files changed, 80 deletions(-)
d8391e
d8391e
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
d8391e
index 6499f67..71267c3 100644
d8391e
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
d8391e
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
d8391e
@@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest {
d8391e
         assertThat(null).nodesByXPath("//foo");
d8391e
     }
d8391e
 
d8391e
-    @Test
d8391e
-    public void testNodesByXPath_withNull_shouldFailed() {
d8391e
-
d8391e
-        thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
d8391e
-
d8391e
-        assertThat("<c/>").nodesByXPath(null);
d8391e
-    }
d8391e
-
d8391e
     @Test
d8391e
     public void testNodesByXPath_withWhitespacesOnly_shouldFailed() {
d8391e
 
d8391e
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
d8391e
index cfa46ce..8031ede 100644
d8391e
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
d8391e
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
d8391e
@@ -82,47 +82,6 @@ public class XmlAssertValidationTest {
d8391e
         assertThat(xml).isValidAgainst(xsd);
d8391e
     }
d8391e
 
d8391e
-    @Test
d8391e
-    public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
d8391e
-
d8391e
-        StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
d8391e
-
d8391e
-        assertThat(xml).isValidAgainst();
d8391e
-        assertThat(xml).isValidAgainst(new Object[0]);
d8391e
-    }
d8391e
-
d8391e
-    @Test
d8391e
-    public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
d8391e
-
d8391e
-        thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
d8391e
-                " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
d8391e
-                " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
d8391e
-
d8391e
-        StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
d8391e
-
d8391e
-        assertThat(xml).isValidAgainst();
d8391e
-    }
d8391e
-
d8391e
-    @Test
d8391e
-    public void testIsValid_shouldPass() {
d8391e
-
d8391e
-        StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
d8391e
-
d8391e
-        assertThat(xml).isValid();
d8391e
-    }
d8391e
-
d8391e
-    @Test
d8391e
-    public void testIsValid_withBrokenXml_shouldPass() {
d8391e
-
d8391e
-        thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
d8391e
-                " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
d8391e
-                " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
d8391e
-
d8391e
-        StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
d8391e
-
d8391e
-        assertThat(xml).isValid();
d8391e
-    }
d8391e
-
d8391e
     @Test
d8391e
     public void testIsInvalid_withBrokenXml_shouldPass() {
d8391e
 
d8391e
@@ -131,16 +90,6 @@ public class XmlAssertValidationTest {
d8391e
         assertThat(xml).isInvalid();
d8391e
     }
d8391e
 
d8391e
-    @Test
d8391e
-    public void testIsInvalid_shouldField() {
d8391e
-
d8391e
-        thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid");
d8391e
-
d8391e
-        StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
d8391e
-
d8391e
-        assertThat(xml).isInvalid();
d8391e
-    }
d8391e
-
d8391e
     @Test
d8391e
     public void testIsValidAgainst_withNullSchemaSources_shouldFailed() {
d8391e
 
d8391e
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
d8391e
index 4aaf96b..d3a9cdd 100644
d8391e
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
d8391e
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
d8391e
@@ -25,14 +25,6 @@ public class XmlAssertValueByXPathTest {
d8391e
     @Rule
d8391e
     public ExpectedException thrown = none();
d8391e
 
d8391e
-    @Test
d8391e
-    public void testValueByXPath_withNull_shouldFailed() {
d8391e
-
d8391e
-        thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
d8391e
-
d8391e
-        assertThat("<c/>").valueByXPath(null);
d8391e
-    }
d8391e
-
d8391e
     @Test
d8391e
     public void testValueByXPath_withWhitespacesOnly_shouldFailed() {
d8391e
 
d8391e
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
d8391e
index 793e26a..eb4e9fa 100644
d8391e
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
d8391e
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
d8391e
@@ -76,19 +76,6 @@ public class ValidationMatcherTest {
d8391e
                    is(valid(new StreamSource(new File("../test-resources/Book.xsd")))));
d8391e
     }
d8391e
 
d8391e
-    @Test
d8391e
-    public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
d8391e
-        try {
d8391e
-            Class.forName("java.nio.file.FileSystem");
d8391e
-        } catch (Throwable t) {
d8391e
-            assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
d8391e
-                       false);
d8391e
-        }
d8391e
-        assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")),
d8391e
-                   is(new ValidationMatcher()));
d8391e
-
d8391e
-    }
d8391e
-
d8391e
     @Test(expected = AssertionError.class)
d8391e
     public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
d8391e
         assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")),
d8391e
-- 
d8391e
2.21.0
d8391e