Class AssertJson<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
uk.org.webcompere.modelassert.json.impl.CoreJsonAssertion<T,AssertJson<T>>
uk.org.webcompere.modelassert.json.assertjson.AssertJson<T>
- Type Parameters:
T- the type of JSON source passed in
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing,JsonNodeAssertDsl<AssertJson<T>>,ArrayNodeDsl<AssertJson<T>>,BooleanNodeDsl<AssertJson<T>>,NumberComparisonDsl<AssertJson<T>>,NumberNodeDsl<AssertJson<T>>,ObjectNodeDsl<AssertJson<T>>,Sizeable<AssertJson<T>>,TextNodeDsl<AssertJson<T>>,IsEqualToDsl<AssertJson<T>>,TreeComparisonDsl<AssertJson<T>>,Satisfies<AssertJson<T>>
The assertJson form of the assertion
-
Constructor Summary
ConstructorsConstructorDescriptionAssertJson(JsonProvider<T> jsonProvider, T source) Constructs an assertion - use theassertJsonfactory method instead -
Method Summary
Modifier and TypeMethodDescriptionAdd a condition that the input JSON must satisfyMethods inherited from class uk.org.webcompere.modelassert.json.impl.CoreJsonAssertion
describeMismatch, describeTo, matches, toArgumentMatcherMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.ArrayNodeDsl
isArray, isArrayContaining, isArrayContaining, isArrayContainingExactly, isArrayContainingExactly, isArrayContainingExactlyInAnyOrder, isArrayContainingExactlyInAnyOrder, isNotArray, satisfiesArrayConditionMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.BooleanNodeDsl
isBoolean, isFalse, isNotBoolean, isTrueMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.tree.IsEqualToDsl
isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualToYaml, isEqualToYaml, isEqualToYaml, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualToYaml, isNotEqualToYaml, isNotEqualToYamlMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.JsonNodeAssertDsl
array, at, booleanNode, hasValue, is, is, isAnyNode, isMissing, isNot, isNotEmpty, isNotMissing, isNotNull, isNull, matches, number, object, textMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.NumberComparisonDsl
isBetween, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isZero, satisfiesNumberConditionMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.NumberNodeDsl
isDouble, isGreaterThanDouble, isGreaterThanInt, isGreaterThanLong, isGreaterThanOrEqualToDouble, isGreaterThanOrEqualToInt, isGreaterThanOrEqualToLong, isInteger, isLessThanDouble, isLessThanInt, isLessThanLong, isLessThanOrEqualToDouble, isLessThanOrEqualToInt, isLessThanOrEqualToLong, isLong, isNotNumber, isNumber, isNumberEqualTo, isNumberNotEqualToMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.ObjectNodeDsl
containsKey, containsKeys, containsKeysExactly, containsKeysExactlyInAnyOrder, doesNotContainKey, doesNotContainKeys, isNotObject, isObject, satisfiesObjectConditionMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.Sizeable
hasSize, isEmpty, sizeMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.TextNodeDsl
isEmptyText, isNotEmptyText, isNotText, isNotText, isText, isText, matches, matches, satisfiesTextCondition, textContains, textDoesNotContain, textDoesNotStartWith, textMatches, textStartsWithMethods inherited from interface uk.org.webcompere.modelassert.json.dsl.nodespecific.TreeComparisonDsl
isEqualTo, isNotEqualTo, where
-
Constructor Details
-
AssertJson
Constructs an assertion - use theassertJsonfactory method instead- Parameters:
jsonProvider- the provider of the json, converting from source type toJsonNodesource- the source value
-
-
Method Details
-
satisfies
Description copied from interface:SatisfiesAdd a condition that the input JSON must satisfy- Specified by:
satisfiesin interfaceSatisfies<T>- Overrides:
satisfiesin classCoreJsonAssertion<T,AssertJson<T>> - Parameters:
condition- the condition- Returns:
thisfor fluent calling
-