Class Result
java.lang.Object
uk.org.webcompere.modelassert.json.Result
The result of comparison. A mutable object passed through conditions to reach a pass/fail
with some explanation of why
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetWas()invert()Flip the resultbooleanisPassed()withNewDescription(String condition) Change the description of the conditionwithPreCondition(String condition) Add a prefix to the condition description
-
Constructor Details
-
Result
Construct a result- Parameters:
condition- what was the condition being evaluatedwas- what the answer actually wasisPassed- is this a success?
-
Result
Construct a result- Parameters:
conditionSupplier- supplies the condition being evaluatedwas- what the answer actually wasisPassed- is this a success?
-
-
Method Details
-
getCondition
-
withPreCondition
Add a prefix to the condition description- Parameters:
condition- the prefix to add- Returns:
- this for fluent calls
-
withNewDescription
Change the description of the condition- Parameters:
condition- new description- Returns:
- this for fluent calls
-
getWas
-
isPassed
public boolean isPassed() -
invert
Flip the result- Returns:
- this for fluent calls
-