skyscreamer / JSONassert

Write JSON unit tests in less code. Great for testing REST interfaces.
http://jsonassert.skyscreamer.org
Apache License 2.0
1k stars 197 forks source link

Assertion not failing if actual child object is null #59

Closed rdettai closed 8 years ago

rdettai commented 8 years ago

The following assertion passes but should fail:

String expected = "{\"foo\":\"superfoo\",\"bar\":{\"bar\":\"superfoo\"}}";
String actual = "{\"foo\":\"superfoo\",\"bar\":null}";
JSONAssert.assertEquals(expected, actual, false);
rdettai commented 8 years ago

My bad, I was using an old version!