File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
xmlunit-assertj3/src/test/java/org/xmlunit/assertj3
xmlunit-assertj/src/test/java/org/xmlunit/assertj Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ public void testAreIdentical_withIgnoreWhitespaceAndTextValue_shouldPass() {
185185 public void testAreIdentical_withIgnoreElementContentWhitespace_shouldFailed () {
186186
187187 thrown .expectAssertionError ("Expecting:%n <control instance> and <test instance> to be identical" );
188- thrown .expectAssertionError ("Expected text value 'x' but was '% nx '" );
188+ thrown .expectAssertionError ("Expected text value 'x' but was '\ n x '" );
189189
190190 String testXml = String .format ("<a>%nx <b/>%n</a>" );
191191 String controlXml = "<a>x<b/></a>" ;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public void testIsNotValidAgainst_withBrokenXml_andExternallyCreatedSchemaInstan
7979 @ Test
8080 public void testIsValidAgainst_withBrokenXml_shouldFail () {
8181
82- thrown .expectAssertionErrorPattern ("^\\ nExpecting: \\ n <.*" + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "invalidBook.xml>\\ nto be valid but found following problems:\\ n .*" );
82+ thrown .expectAssertionErrorPattern ("^( \\ r \\ n?| \\ n)Expecting:( \\ r \\ n?| \\ n) <.*" + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "invalidBook.xml>( \\ r \\ n?| \\ n)to be valid but found following problems:( \\ r \\ n?| \\ n) .*" );
8383 thrown .expectAssertionError ("1. line=9; column=8; type=ERROR;" +
8484 " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
8585 " One of '{\" https://www.xmlunit.org/publishing\" :Publisher}' is expected." );
@@ -167,8 +167,8 @@ public void testIsInvalid_withBrokenXml_shouldPass() {
167167 @ Test
168168 public void testIsInvalid_shouldFail () {
169169
170- thrown .expectAssertionErrorPattern ("^\\ nExpecting: \\ n <.*"
171- + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "BookXsdGenerated.xml>\\ nto be invalid" );
170+ thrown .expectAssertionErrorPattern ("^( \\ r \\ n?| \\ n)Expecting:( \\ r \\ n?| \\ n) <.*"
171+ + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "BookXsdGenerated.xml>( \\ r \\ n?| \\ n)to be invalid" );
172172
173173 StreamSource xml = new StreamSource (new File (TestResources .TEST_RESOURCE_DIR + "BookXsdGenerated.xml" ));
174174
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ public void testAreIdentical_withIgnoreWhitespaceAndTextValue_shouldPass() {
185185 public void testAreIdentical_withIgnoreElementContentWhitespace_shouldFailed () {
186186
187187 thrown .expectAssertionError ("Expecting:%n <control instance> and <test instance> to be identical" );
188- thrown .expectAssertionError ("Expected text value 'x' but was '% nx '" );
188+ thrown .expectAssertionError ("Expected text value 'x' but was '\ n x '" );
189189
190190 String testXml = String .format ("<a>%nx <b/>%n</a>" );
191191 String controlXml = "<a>x<b/></a>" ;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public void testIsNotValidAgainst_withBrokenXml_andExternallyCreatedSchemaInstan
7979 @ Test
8080 public void testIsValidAgainst_withBrokenXml_shouldFail () {
8181
82- thrown .expectAssertionErrorPattern ("^\\ nExpecting :\\ n <.*" + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "invalidBook.xml>\\ nto be valid but found following problems:\\ n .*" );
82+ thrown .expectAssertionErrorPattern ("^\\ RExpecting :\\ R <.*" + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "invalidBook.xml>\\ Rto be valid but found following problems:\\ R .*" );
8383 thrown .expectAssertionError ("1. line=9; column=8; type=ERROR;" +
8484 " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
8585 " One of '{\" https://www.xmlunit.org/publishing\" :Publisher}' is expected." );
@@ -167,8 +167,8 @@ public void testIsInvalid_withBrokenXml_shouldPass() {
167167 @ Test
168168 public void testIsInvalid_shouldFail () {
169169
170- thrown .expectAssertionErrorPattern ("^\\ nExpecting :\\ n <.*"
171- + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "BookXsdGenerated.xml>\\ nto be invalid" );
170+ thrown .expectAssertionErrorPattern ("^\\ RExpecting :\\ R <.*"
171+ + Pattern .quote (TestResources .TEST_RESOURCE_DIR ) + "BookXsdGenerated.xml>\\ Rto be invalid" );
172172
173173 StreamSource xml = new StreamSource (new File (TestResources .TEST_RESOURCE_DIR + "BookXsdGenerated.xml" ));
174174
You can’t perform that action at this time.
0 commit comments