A Verifiable is an object that can confirm at the end of a unit test that the correct behaviour has occurred. More...
Public Member Functions | |
Verifiable (const String &name, VerifiableList *parent) | |
Constructs the expectation. | |
virtual | ~Verifiable () |
Destructs the expectation. | |
virtual void | verify ()=0 |
Throws an AssertionFailedException if any expectations have not been met. | |
virtual void | reset ()=0 |
Sets all internal data to the state after construction. | |
String | getVerifiableName () const |
Gets the name of the current mock object. | |
void | setParent (VerifiableList *parent) |
Sets a pointer to the parent of this object. | |
VerifiableList * | getParent () const |
Gets a pointer to the parent of this object. | |
virtual unsigned | numVerifiables () const |
Gets the number of verifiable sub-objects. | |
Protected Member Functions | |
virtual Verifiable * | getVerifiable (unsigned idx) |
Gets a pointer to a verifiable sub-obect. | |
Friends | |
class | MockObject |
A Verifiable is an object that can confirm at the end of a unit test that the correct behaviour has occurred.
Definition at line 48 of file Verifiable.h.
mockpp::Verifiable::Verifiable | ( | const String & | name, | |
VerifiableList * | parent | |||
) |
Constructs the expectation.
name | human readable description about the expectation | |
parent | parent verifiable |
Definition at line 43 of file Verifiable.cpp.
VerifiableList * mockpp::Verifiable::getParent | ( | ) | const |
Gets a pointer to the parent of this object.
Definition at line 72 of file Verifiable.cpp.
Verifiable * mockpp::Verifiable::getVerifiable | ( | unsigned | idx | ) | [protected, virtual] |
Gets a pointer to a verifiable sub-obect.
idx | index of object in the list |
Reimplemented in mockpp::VerifiableList.
Definition at line 84 of file Verifiable.cpp.
String mockpp::Verifiable::getVerifiableName | ( | ) | const |
Gets the name of the current mock object.
Names can be arbitrarily but should be chosen carefully to be able to find the according object.
Definition at line 52 of file Verifiable.cpp.
unsigned mockpp::Verifiable::numVerifiables | ( | ) | const [virtual] |
Gets the number of verifiable sub-objects.
Reimplemented in mockpp::VerifiableList.
Definition at line 78 of file Verifiable.cpp.
void mockpp::Verifiable::setParent | ( | VerifiableList * | parent | ) |
Sets a pointer to the parent of this object.
parent | pointer to parent |
Definition at line 66 of file Verifiable.cpp.