Skip to content

Commit

Permalink
fixed issue skyscreamer#130
Browse files Browse the repository at this point in the history
  • Loading branch information
zihanxu3 committed Dec 8, 2021
1 parent 7aeb2e3 commit bf3533c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/java/org/skyscreamer/jsonassert/JSONAssertTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ public void testAssertNotEqualsString2JsonComparator() throws IllegalArgumentExc
new RegularExpressionValueMatcher<Object>("\\d"))
));
}

@Test
public void testAssertWithNullValues1() throws JSONException {
performAssertEqualsTestForMessageVerification("[{id:1},]", "[{id:1},{}]", true);
Expand All @@ -660,8 +661,22 @@ public void testAssertWithNullValues4() throws JSONException {

@Test
public void testAssertWithNullValues5() throws JSONException {
JSONAssert.assertEquals("[{id:1},{id:2},{id:3},]" , "[{id:1},{id:2},{id:3},]" , true);
}

@Test
public void testAssertWithNullValues6() throws JSONException {
JSONAssert.assertEquals("[{id:1},{id:2},]" , "[{id:1},{id:2},]" , true);
}
@Test
public void testAssertWithNullValues7() throws JSONException {
performAssertEqualsTestForMessageVerification("[{id:1},{id:2},{id:3},]", "[{id:1},{id:2},{id:3},{}]", true);
}

@Test
public void testAssertWithNullValues8() throws JSONException {
JSONAssert.assertEquals("[{id:1},{id:2},{id:3},]" , "[{id:1},{id:2},{id:3},]" , true);
}

private void testPass(String expected, String actual, JSONCompareMode compareMode)
throws JSONException
Expand Down

0 comments on commit bf3533c

Please sign in to comment.