|
|
|
@ -45,11 +45,14 @@ public class JsonAssertTest {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void invalid_path() throws Exception { |
|
|
|
|
with(JSON).assertThat("$.store.book[*].fooBar", collectionWithSize(equalTo(4))); |
|
|
|
|
with(JSON).assertThat("$.store.book[*].fooBar", emptyCollection()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = AssertionError.class) |
|
|
|
|
public void failed_error_message() throws Exception { |
|
|
|
|
|
|
|
|
|
with(JSON).assertThat("$.store.book[0].category", endsWith("foobar")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|