diff --git a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java index 4d0d7d05..f33d91a8 100644 --- a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java +++ b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java @@ -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")); }