@@ -25,13 +25,13 @@ public void succeedsWithEmptyArrays() throws JSONException {
2525 @ Test
2626 public void reportsArraysOfUnequalLength () throws JSONException {
2727 JSONCompareResult result = compareJSON ("[4]" , "[]" , LENIENT );
28- assertThat (result , failsWithMessage (equalTo ("[]: Expected 1 values and got 0" )));
28+ assertThat (result , failsWithMessage (equalTo ("[]: Expected 1 values but got 0" )));
2929 }
3030
3131 @ Test
3232 public void reportsArrayMissingExpectedElement () throws JSONException {
3333 JSONCompareResult result = compareJSON ("[4]" , "[7]" , LENIENT );
34- assertThat (result , failsWithMessage (equalTo ("[]\n Expected: 4\n but none found\n ; []: Contains 7, but not expected " )));
34+ assertThat (result , failsWithMessage (equalTo ("[]\n Expected: 4\n but none found\n ; []\n Unexpected: 7 \n " )));
3535 }
3636
3737 @ Test
@@ -73,7 +73,7 @@ public void reportsUnexpectedNonNull() throws JSONException {
7373 @ Test
7474 public void reportsUnexpectedFieldInNonExtensibleMode () throws JSONException {
7575 JSONCompareResult result = compareJSON ("{\" obj\" : {}}" , "{\" obj\" : {\" id\" : 3}}" , NON_EXTENSIBLE );
76- assertThat (result , failsWithMessage (equalTo ("Got unexpected field: obj.id " )));
76+ assertThat (result , failsWithMessage (equalTo ("obj \n Unexpected: id \n " )));
7777 }
7878
7979 @ Test
@@ -85,14 +85,14 @@ public void reportsMismatchedTypes() throws JSONException {
8585 @ Test
8686 public void reportsWrongSimpleValueCountInUnorderedArray () throws JSONException {
8787 JSONCompareResult result = compareJSON ("[5, 5]" , "[5, 7]" , LENIENT );
88- assertThat (result , failsWithMessage (equalTo ("[]: Expected 2 occurrence(s) of 5 but got 1 occurrence(s) ; []: Contains 7, but not expected " )));
88+ assertThat (result , failsWithMessage (equalTo ("[]: Expected 2 occurrence(s) of 5 but got 1 occurrence(s) ; []\n Unexpected: 7 \n " )));
8989 }
9090
9191 @ Test
9292 public void reportsMissingJSONObjectWithUniqueKeyInUnorderedArray () throws JSONException {
9393 JSONCompareResult result = compareJSON ("[{\" id\" : 3}]" , "[{\" id\" : 5}]" , LENIENT );
9494 assertThat (result , failsWithMessage (equalTo ("[id=3]\n Expected: a JSON object\n but none found\n ; " +
95- "[]: Contains object where id=5, but not expected " )));
95+ "[id=5] \n Unexpected: a JSON object \n " )));
9696 }
9797
9898 @ Test
0 commit comments