public MatcherResult
An instance of interface MatcherResult contains the result of an evaluation of a interface Matcher.
interface MatcherResult,
interface Matcher| Modifier and Type | Interface and Description |
|---|---|
static class |
MatcherResult.Companion |
| Modifier and Type | Field and Description |
|---|---|
static MatcherResult.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
failureMessage()
Returns a message indicating why the evaluation failed
for when this matcher is used in the positive sense. For example,
if a size matcher was used like
mylist should haveSize(5) then
an appropriate error message would be "list should be size 5". |
java.lang.String |
negatedFailureMessage()
Returns a message indicating why the evaluation
failed for when this matcher is used in the negative sense. For example,
if a size matcher was used like
mylist shouldNot haveSize(5) then
an appropriate negated failure would be "List should not have size 5". |
boolean |
passed()
Returns true if the matcher indicated this was a valid
value and false if the matcher indicated an invalid value.
|
static MatcherResult.Companion Companion
boolean passed()
Returns true if the matcher indicated this was a valid value and false if the matcher indicated an invalid value.
java.lang.String failureMessage()
Returns a message indicating why the evaluation failed
for when this matcher is used in the positive sense. For example,
if a size matcher was used like mylist should haveSize(5) then
an appropriate error message would be "list should be size 5".
java.lang.String negatedFailureMessage()
Returns a message indicating why the evaluation
failed for when this matcher is used in the negative sense. For example,
if a size matcher was used like mylist shouldNot haveSize(5) then
an appropriate negated failure would be "List should not have size 5".