2020-05-15 11:54:16 +00:00
|
|
|
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 @@
|
2019-07-29 16:48:47 +00:00
|
|
|
}
|
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
@Test
|
2019-07-29 16:48:47 +00:00
|
|
|
- public void testNodesByXPath_withNull_shouldFailed() {
|
|
|
|
-
|
|
|
|
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
|
|
|
|
-
|
|
|
|
- assertThat("<a><b></b><c/></a>").nodesByXPath(null);
|
|
|
|
- }
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- @Test
|
2019-07-29 16:48:47 +00:00
|
|
|
public void testNodesByXPath_withWhitespacesOnly_shouldFailed() {
|
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
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 @@
|
2019-07-29 16:48:47 +00:00
|
|
|
}
|
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
@Test
|
2019-07-29 16:48:47 +00:00
|
|
|
- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
|
|
|
- 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.");
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
|
|
|
- assertThat(xml).isValidAgainst();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Test
|
|
|
|
- public void testIsValid_shouldPass() {
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
|
|
|
- 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.");
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
|
|
|
- assertThat(xml).isValid();
|
|
|
|
- }
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- @Test
|
2019-07-29 16:48:47 +00:00
|
|
|
public void testIsInvalid_withBrokenXml_shouldPass() {
|
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "invalidBook.xml"));
|
|
|
|
|
2019-07-29 16:48:47 +00:00
|
|
|
assertThat(xml).isInvalid();
|
|
|
|
}
|
2020-05-15 11:54:16 +00:00
|
|
|
-
|
2019-07-29 16:48:47 +00:00
|
|
|
- @Test
|
|
|
|
- public void testIsInvalid_shouldField() {
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
|
|
|
|
- + Pattern.quote(TestResources.TEST_RESOURCE_DIR) + "BookXsdGenerated.xml>\\nto be invalid");
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
|
2019-07-29 16:48:47 +00:00
|
|
|
-
|
|
|
|
- assertThat(xml).isInvalid();
|
|
|
|
- }
|
2020-05-15 11:54:16 +00:00
|
|
|
|
2019-07-29 16:48:47 +00:00
|
|
|
@Test
|
|
|
|
public void testIsValidAgainst_withNullSchemaSources_shouldFailed() {
|
2020-05-15 11:54:16 +00:00
|
|
|
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();
|
2019-07-29 16:48:47 +00:00
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
@Test
|
2019-07-29 16:48:47 +00:00
|
|
|
- public void testValueByXPath_withNull_shouldFailed() {
|
|
|
|
-
|
|
|
|
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
|
|
|
|
-
|
|
|
|
- assertThat("<a><b></b><c/></a>").valueByXPath(null);
|
|
|
|
- }
|
|
|
|
-
|
2020-05-15 11:54:16 +00:00
|
|
|
- @Test
|
2019-07-29 16:48:47 +00:00
|
|
|
public void testValueByXPath_withWhitespacesOnly_shouldFailed() {
|
|
|
|
|
2020-05-15 11:54:16 +00:00
|
|
|
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)))));
|
2019-07-29 16:48:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- @Test
|
|
|
|
- public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
|
|
|
|
- try {
|
|
|
|
- Class.forName("java.nio.file.FileSystem");
|
|
|
|
- } catch (Throwable t) {
|
|
|
|
- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
|
|
|
|
- false);
|
|
|
|
- }
|
2020-05-15 11:54:16 +00:00
|
|
|
- assertThat(new StreamSource(new File(TEST_RESOURCE_DIR + "BookXsdGenerated.xml")),
|
2019-07-29 16:48:47 +00:00
|
|
|
- is(new ValidationMatcher()));
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Test(expected = AssertionError.class)
|
|
|
|
public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
|
2020-05-15 11:54:16 +00:00
|
|
|
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~.
|