Base class for helper objects to mock invocations. More...
Classes | |
class | DefaultDescriber |
Default describer. More... | |
class | Describer |
This encapsulates knowledge about how the InvocationMockerBuilder class adds matchers to an InvocationMocker. More... | |
class | DescriberBase |
Base for describer objects. More... | |
Public Types | |
typedef std::vector < InvocationMatcher< I > * > | List |
internal shorthand | |
typedef List::iterator | Iterator |
internal shorthand | |
typedef List::const_iterator | ConstIterator |
internal shorthand | |
Public Member Functions | |
virtual | ~InvocationMockerBase () |
Destroys the object. | |
virtual void | reset () |
Removes all the objects from the list. | |
virtual bool | matches (const I &invocation) |
Checks if an invocation matches the expectaton. | |
virtual void | verify () |
Verify that the expected value is within the allowed bounds. | |
virtual void | setName (const String &in_name) |
Sets the object's name. | |
virtual void | addMatcher (const MatcherHolder< I > &holder) |
Adds another matcher. | |
virtual void | setStub (const StubHolder< R, I > &in_stub) |
Sets the stub data for the invocation. | |
virtual bool | hasDescription () |
Does the object provide meaningful description via describeTo() ?. | |
virtual String | describeTo (String &buffer) const |
Appends the description of this object to the buffer. | |
Protected Member Functions | |
InvocationMockerBase (AutoPointer< DescriberBase > in_describer, const StubHolder< R, I > &defaultStub) | |
Constructs the object. | |
Protected Attributes | |
List | matchers |
internal shorthand | |
Stub< R, I >::AP | stub |
internal shorthand |
Base class for helper objects to mock invocations.
Definition at line 63 of file InvocationMocker.h.
mockpp::InvocationMockerBase< R, I >::InvocationMockerBase | ( | AutoPointer< DescriberBase > | in_describer, | |
const StubHolder< R, I > & | defaultStub | |||
) | [inline, protected] |
Constructs the object.
in_describer | pointer to describer object | |
defaultStub | pointer to default stub object |
Definition at line 76 of file InvocationMocker.h.
virtual void mockpp::InvocationMockerBase< R, I >::addMatcher | ( | const MatcherHolder< I > & | holder | ) | [inline, virtual] |
Adds another matcher.
holder | the matcher object |
Implements mockpp::StubMatchersCollection< R, I >.
Definition at line 154 of file InvocationMocker.h.
virtual String mockpp::InvocationMockerBase< R, I >::describeTo | ( | String & | buffer | ) | const [inline, virtual] |
Appends the description of this object to the buffer.
buffer | The buffer that the description is appended to. |
Implements mockpp::SelfDescribing.
Definition at line 180 of file InvocationMocker.h.
virtual bool mockpp::InvocationMockerBase< R, I >::hasDescription | ( | ) | [inline, virtual] |
Does the object provide meaningful description via describeTo() ?.
Implements mockpp::Invokable< R, I >.
Definition at line 171 of file InvocationMocker.h.
virtual bool mockpp::InvocationMockerBase< R, I >::matches | ( | const I & | invocation | ) | [inline, virtual] |
Checks if an invocation matches the expectaton.
invocation | the invocation data |
Implements mockpp::Invokable< R, I >.
Definition at line 113 of file InvocationMocker.h.
virtual void mockpp::InvocationMockerBase< R, I >::setStub | ( | const StubHolder< R, I > & | in_stub | ) | [inline, virtual] |
Sets the stub data for the invocation.
in_stub | the stub object |
Implements mockpp::StubMatchersCollection< R, I >.
Definition at line 163 of file InvocationMocker.h.
virtual void mockpp::InvocationMockerBase< R, I >::verify | ( | ) | [inline, virtual] |
Verify that the expected value is within the allowed bounds.
If it fails, an AssertionFailedError is thrown
Implements mockpp::Verifiable.
Definition at line 126 of file InvocationMocker.h.