java.lang.Object
uk.org.webcompere.modelassert.json.condition.HasValueWithLooseType
- All Implemented Interfaces:
Condition
Performs the hasValue operation with flexibility and type flexibility. It works
out the likely type of node from the input.
-
Constructor Summary
Constructors
Construct with the expected value
-
Method Summary
test(com.fasterxml.jackson.databind.JsonNode node)
Execute the test of the condition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
HasValueWithLooseType
public HasValueWithLooseType(Object expected)
Construct with the expected value
- Parameters:
expected - the value expected
-
Method Details
-
test
public Result test(com.fasterxml.jackson.databind.JsonNode node)
Execute the test of the condition
- Specified by:
test in interface Condition
- Parameters:
node - the json to test
- Returns:
- a
Result explaining whether the condition was met and if not, why not
-
describe
Describe the condition
- Specified by:
describe in interface Condition
- Returns:
- description of the condition