|
|
|
@ -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"), |
|
|
|
|