Class PredicateWrappedCondition
java.lang.Object
uk.org.webcompere.modelassert.json.condition.PredicateWrappedCondition
- All Implemented Interfaces:
Condition
A condition which checks a predicate for the node and then delegates to a further condition.
This can be used without a further condition, just to test the node type
-
Constructor Summary
ConstructorsConstructorDescriptionPredicateWrappedCondition(String typeName, Predicate<com.fasterxml.jackson.databind.JsonNode> typeDetector) Construct the conditionPredicateWrappedCondition(String typeName, Predicate<com.fasterxml.jackson.databind.JsonNode> typeDetector, Condition delegate) Construct the condition -
Method Summary
-
Constructor Details
-
PredicateWrappedCondition
public PredicateWrappedCondition(String typeName, Predicate<com.fasterxml.jackson.databind.JsonNode> typeDetector) Construct the condition- Parameters:
typeName- the name of the type for descriptiontypeDetector- detects if the node's the right type
-
PredicateWrappedCondition
public PredicateWrappedCondition(String typeName, Predicate<com.fasterxml.jackson.databind.JsonNode> typeDetector, Condition delegate) Construct the condition- Parameters:
typeName- the name of the type for descriptiontypeDetector- detects if the node's the right typedelegate- the condition to hand over to, if the node's of the correct type
-
-
Method Details
-
test
Execute the test of the condition -
describe
Describe the condition
-