|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JsonAsserter
User: kallestenflo Date: 1/24/11 Time: 9:22 PM
| Method Summary | ||
|---|---|---|
JsonAsserter |
and()
Syntactic sugar to allow chaining assertions with a separating and() statement
with(json).assertThat("firstName", is(equalTo("Bobby"))).and().assertThat("lastName", is(equalTo("Ewing")))
|
|
|
assertEquals(String path,
T expected)
Asserts that object specified by path is equal to the expected value. |
|
JsonAsserter |
assertNotDefined(String path)
Checks that a path is not defined within a document. |
|
|
assertNotNull(String path)
Asserts that object specified by path is NOT null. |
|
JsonAsserter |
assertNull(String path)
Asserts that object specified by path is null. |
|
|
assertThat(String path,
org.hamcrest.Matcher<T> matcher)
Asserts that object specified by path satisfies the condition specified by matcher. |
|
| Method Detail |
|---|
<T> JsonAsserter assertThat(String path,
org.hamcrest.Matcher<T> matcher)
with(json).assertThat("items[0].name", equalTo("Bobby"))
.assertThat("items[0].age" , equalTo(24L))
T - the static type accepted by the matcherpath - the json path specifying the value being comparedmatcher - an expression, built of Matchers, specifying allowed values
<T> JsonAsserter assertEquals(String path,
T expected)
T - the static type that should be returned by the pathpath - the json path specifying the value being comparedexpected - the expected value
JsonAsserter assertNotDefined(String path)
path - the path to make sure not exists
JsonAsserter assertNull(String path)
path - the json path specifying the value that should be null
<T> JsonAsserter assertNotNull(String path)
path - the json path specifying the value that should be NOT null
JsonAsserter and()
with(json).assertThat("firstName", is(equalTo("Bobby"))).and().assertThat("lastName", is(equalTo("Ewing")))
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||