public class Result
The class Result class contains the result of an evaluation of a matcher.
class Result| Constructor and Description |
|---|
Result(boolean passed,
java.lang.String failureMessage,
java.lang.String negatedFailureMessage)
The
class Result class contains the result of an evaluation of a matcher. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
component1()
set to true if the matcher indicated this was a valid
|
java.lang.String |
component2()
a message indicating why the evaluation failed
|
java.lang.String |
component3()
a message indicating why the evaluation
|
Result |
copy(boolean passed,
java.lang.String failureMessage,
java.lang.String negatedFailureMessage)
The
class Result class contains the result of an evaluation of a matcher. |
boolean |
equals(java.lang.Object p) |
java.lang.String |
getFailureMessage()
a message indicating why the evaluation failed
|
java.lang.String |
getNegatedFailureMessage()
a message indicating why the evaluation
|
boolean |
getPassed()
set to true if the matcher indicated this was a valid
|
int |
hashCode() |
java.lang.String |
toString() |
public Result(boolean passed,
java.lang.String failureMessage,
java.lang.String negatedFailureMessage)
The class Result class contains the result of an evaluation of a matcher.
passed - set to true if the matcher indicated this was a validvalue and false if the matcher indicated an invalid valuefailureMessage - a message indicating why the evaluation failedfor when this matcher is used in the positive sense. For example,if a size matcher was used like mylist should haveSize(5) thenan appropriate error message would be "list should be size 5".negatedFailureMessage - a message indicating why the evaluationfailed for when this matcher is used in the negative sense. For example,if a size matcher was used like mylist shouldNot haveSize(5) thenan appropriate negated failure would be "List should not have size 5".passed - set to true if the matcher indicated this was a valid
value and false if the matcher indicated an invalid valuefailureMessage - 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".negatedFailureMessage - 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".class Resultpublic boolean getPassed()
set to true if the matcher indicated this was a valid
value and false if the matcher indicated an invalid value
public java.lang.String getFailureMessage()
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) thenan appropriate error message would be "list should be size 5".
public java.lang.String getNegatedFailureMessage()
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) thenan appropriate negated failure would be "List should not have size 5".
public boolean component1()
set to true if the matcher indicated this was a valid
value and false if the matcher indicated an invalid value
public java.lang.String component2()
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) thenan appropriate error message would be "list should be size 5".
public java.lang.String component3()
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) thenan appropriate negated failure would be "List should not have size 5".
public Result copy(boolean passed, java.lang.String failureMessage, java.lang.String negatedFailureMessage)
The class Result class contains the result of an evaluation of a matcher.
passed - set to true if the matcher indicated this was a valid
value and false if the matcher indicated an invalid valuefailureMessage - 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".negatedFailureMessage - 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".class Resultpublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)