|
|
@ -26,6 +26,15 @@ public interface JsonAsserter { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
<T> JsonAsserter assertThat(String path, Matcher<T> matcher); |
|
|
|
<T> JsonAsserter assertThat(String path, Matcher<T> matcher); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param path |
|
|
|
|
|
|
|
* @param matcher |
|
|
|
|
|
|
|
* @param message |
|
|
|
|
|
|
|
* @param <T> |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
<T> JsonAsserter assertThat(String path, Matcher<T> matcher, String message); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Asserts that object specified by path is equal to the expected value. |
|
|
|
* Asserts that object specified by path is equal to the expected value. |
|
|
|
* If they are not, an AssertionError is thrown with the given message. |
|
|
|
* If they are not, an AssertionError is thrown with the given message. |
|
|
@ -37,6 +46,8 @@ public interface JsonAsserter { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
<T> JsonAsserter assertEquals(String path, T expected); |
|
|
|
<T> JsonAsserter assertEquals(String path, T expected); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<T> JsonAsserter assertEquals(String path, T expected, String message); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Checks that a path is not defined within a document. If the document contains the |
|
|
|
* Checks that a path is not defined within a document. If the document contains the |
|
|
|
* given path, an AssertionError is thrown |
|
|
|
* given path, an AssertionError is thrown |
|
|
@ -46,6 +57,8 @@ public interface JsonAsserter { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
JsonAsserter assertNotDefined(String path); |
|
|
|
JsonAsserter assertNotDefined(String path); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JsonAsserter assertNotDefined(String path, String message); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Asserts that object specified by path is null. If it is not, an AssertionError |
|
|
|
* Asserts that object specified by path is null. If it is not, an AssertionError |
|
|
@ -55,6 +68,7 @@ public interface JsonAsserter { |
|
|
|
* @return this to allow fluent assertion chains |
|
|
|
* @return this to allow fluent assertion chains |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
JsonAsserter assertNull(String path); |
|
|
|
JsonAsserter assertNull(String path); |
|
|
|
|
|
|
|
JsonAsserter assertNull(String path, String message); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Asserts that object specified by path is NOT null. If it is, an AssertionError |
|
|
|
* Asserts that object specified by path is NOT null. If it is, an AssertionError |
|
|
@ -65,6 +79,8 @@ public interface JsonAsserter { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
<T> JsonAsserter assertNotNull(String path); |
|
|
|
<T> JsonAsserter assertNotNull(String path); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<T> JsonAsserter assertNotNull(String path, String message); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Syntactic sugar to allow chaining assertions with a separating and() statement |
|
|
|
* Syntactic sugar to allow chaining assertions with a separating and() statement |
|
|
|
* <p/> |
|
|
|
* <p/> |
|
|
|