Browse Source

Add hasNoJsonPath testcase for explicit null

pull/424/head
John Bard 7 years ago
parent
commit
efd1de8ffb
  1. 6
      json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java

6
json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java

@ -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")));
}
@Test
public void shouldBeDescriptive() {
assertThat(hasNoJsonPath("$.name"),

Loading…
Cancel
Save