Add hasNoJsonPath testcase for explicit null
@ -8,6 +8,7 @@ import static org.junit.Assert.assertThat;
public class HasNoJsonPathTest {
private static final String JSON_STRING = "{" +
"\"none\": null," +
"\"name\": \"Jessie\"" +
"}";
@ -21,6 +22,11 @@ public class HasNoJsonPathTest {
assertThat(JSON_STRING, not(hasNoJsonPath("$.name")));
}
@Test
public void shouldNotMatchExplicitNull() {
assertThat(JSON_STRING, not(hasNoJsonPath("$.none")));
public void shouldBeDescriptive() {
assertThat(hasNoJsonPath("$.name"),