Class PathDsl<A>
java.lang.Object
uk.org.webcompere.modelassert.json.dsl.nodespecific.tree.PathDsl<A>
- Type Parameters:
A- the overall type of assertion
- All Implemented Interfaces:
JsonNodeAssertDsl<WhereDsl<A>>,ArrayNodeDsl<WhereDsl<A>>,BooleanNodeDsl<WhereDsl<A>>,NumberComparisonDsl<WhereDsl<A>>,NumberNodeDsl<WhereDsl<A>>,ObjectNodeDsl<WhereDsl<A>>,Sizeable<WhereDsl<A>>,TextNodeDsl<WhereDsl<A>>,IsEqualToDsl<WhereDsl<A>>,TreeComparisonDsl<WhereDsl<A>>,Satisfies<WhereDsl<A>>
Path DSL context within the
WhereDsl-
Method Summary
Modifier and TypeMethodDescriptionAllow the array at this position in the tree to just contain the other elements rather than match it completelyRelax the ordering requirement for an array at this position in the treestatic <A> PathDsl<A>fromJsonPointer(WhereDsl<A> where, String jsonPointer) Create a path DSL from a JSON Pointer expression.Ignore everything at this pathAdd aTreeRule.IGNORE_KEY_ORDERto the clauseAdd aTreeRule.REQUIRE_KEY_ORDERto the path - this can't be done inWhereDslas it is already the default so wouldn't mean anythingAllow missing keys in objectsAdd a condition that the input JSON must satisfyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
-
Method Details
-
fromJsonPointer
Create a path DSL from a JSON Pointer expression. Note: this allows for matching to the root object with a path of"/"- Type Parameters:
A- the type of assertion- Parameters:
where- the parent wherejsonPointer- the pointer expression- Returns:
- a new
PathDslfor adding configuration to
-
satisfies
Description copied from interface:SatisfiesAdd a condition that the input JSON must satisfy -
keysInAnyOrder
Add aTreeRule.IGNORE_KEY_ORDERto the clause- Returns:
- the
WhereDslfor fluent calling with the path added
-
keysInOrder
Add aTreeRule.REQUIRE_KEY_ORDERto the path - this can't be done inWhereDslas it is already the default so wouldn't mean anything- Returns:
- the
WhereDslfor fluent calling with the path added
-
objectContains
Allow missing keys in objects- Returns:
- the
WhereDslfor fluent calling with the path added
-
arrayInAnyOrder
Relax the ordering requirement for an array at this position in the tree- Returns:
thisfor fluent calling
-
arrayContains
Allow the array at this position in the tree to just contain the other elements rather than match it completely- Returns:
thisfor fluent calling
-
isIgnored
Ignore everything at this path- Returns:
- the
WhereDslfor fluent calling, with this path ignored
-