Class TreeComparisonCondition
java.lang.Object
uk.org.webcompere.modelassert.json.condition.tree.TreeComparisonCondition
- All Implemented Interfaces:
Condition
Compare with a whole JSON structure
-
Method Summary
Modifier and TypeMethodDescriptiondescribe()Describe the conditionstatic TreeComparisonConditionisEqualTo(com.fasterxml.jackson.databind.JsonNode tree) Construct equals condition from a JsonNodestatic <T> TreeComparisonConditionisEqualTo(T json, JsonProvider<T> provider) Construct equals condition from any json object and its convertertest(com.fasterxml.jackson.databind.JsonNode json) Execute the test of the conditionAdd rules to the comparison
-
Method Details
-
isEqualTo
Construct equals condition from any json object and its converter- Type Parameters:
T- the type of the JSON- Parameters:
json- the object to read the json fromprovider- the converter- Returns:
- the condition
-
isEqualTo
Construct equals condition from a JsonNode- Parameters:
tree- the json node- Returns:
- the condition
-
withRules
Add rules to the comparison- Parameters:
rules- the rules- Returns:
thisfor fluent calling
-
test
Execute the test of the condition -
describe
Describe the condition
-