org.apache.qpid.test.framework
Class AssertionBase
java.lang.Object
org.apache.qpid.test.framework.AssertionBase
- All Implemented Interfaces:
- Assertion
public abstract class AssertionBase
- extends Object
- implements Assertion
AssertionBase is a base class for implenmenting assertions. It provides a mechanism to store error messages, and
report all error messages when its toString()
method is called.
CRC Card
Responsibilities | Collaborations
|
---|
Collect error messages.
|
Method Summary |
void |
addError(String error)
Adds an error message to the assertion. |
String |
toString()
Prints all of the error messages in the assertion into a string. |
Methods inherited from interface org.apache.qpid.test.framework.Assertion |
apply |
errors
List<String> errors
- Holds the error messages.
AssertionBase
public AssertionBase()
addError
public void addError(String error)
- Adds an error message to the assertion.
- Parameters:
error
- An error message to add to the assertion.
toString
public String toString()
- Prints all of the error messages in the assertion into a string.
- Overrides:
toString
in class Object
- Returns:
- All of the error messages in the assertion as a string.
Licensed to the Apache Software Foundation