|
|
@ -45,11 +45,14 @@ public class JsonAssertTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void invalid_path() throws Exception { |
|
|
|
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) |
|
|
|
@Test(expected = AssertionError.class) |
|
|
|
public void failed_error_message() throws Exception { |
|
|
|
public void failed_error_message() throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
with(JSON).assertThat("$.store.book[0].category", endsWith("foobar")); |
|
|
|
with(JSON).assertThat("$.store.book[0].category", endsWith("foobar")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|