Build chaining mocks. More...
Public Member Functions | |
ChainingMockBuilder (DynamicChainingMock< R, I > *in_coreMock, BuilderNamespace *in_buildernamespace, const String &name) | |
Construct the object. | |
String | toString () const |
Transform the object's state to a human readable string. | |
virtual void | verify () |
Verify that the expected value is within the allowed bounds. | |
virtual void | addInvokable (typename Invokable< R, I >::AP invokable) |
Adds an invokable to the mock object. | |
InvocationMockerBuilder< AMB > & | stubs () |
Stubs an invocation. | |
InvocationMockerBuilder< AMB > & | stubs (const MatcherHolder< I > &customMatcher) |
Stubs an invocation. | |
InvocationMockerBuilder< AMB > & | expects (const MatcherHolder< I > &expectation) |
Expects an invocation. | |
virtual void | setDefaultStub (const mockpp::StubHolder< R, I > &newDefaultStub) |
Sets the default stub for the object. | |
void | reset () |
Clears all internal states. | |
MatchBuilderAdapterBase * | lookupID (const String &id) const |
Searches a match builder. | |
void | registerUniqueID (const String &id, MatchBuilderAdapterBase *builder) |
Registers a match builder. |
Build chaining mocks.
Definition at line 58 of file ChainingMockBuilder.h.
mockpp::ChainingMockBuilder< AMB >::ChainingMockBuilder | ( | DynamicChainingMock< R, I > * | in_coreMock, | |
BuilderNamespace * | in_buildernamespace, | |||
const String & | name | |||
) | [inline] |
Construct the object.
in_coreMock | pointer to core mock | |
in_buildernamespace | builder names | |
name | mock name |
Definition at line 72 of file ChainingMockBuilder.h.
virtual void mockpp::ChainingMockBuilder< AMB >::addInvokable | ( | typename Invokable< R, I >::AP | invokable | ) | [inline, virtual] |
Adds an invokable to the mock object.
invokable | pointer to the default stub |
Implements mockpp::DynamicChainingMock< AMB::ReturnType, AMB::InvocationType >.
Definition at line 99 of file ChainingMockBuilder.h.
MatchBuilderAdapterBase* mockpp::ChainingMockBuilder< AMB >::lookupID | ( | const String & | id | ) | const [inline] |
Searches a match builder.
id | name of the builder |
Definition at line 156 of file ChainingMockBuilder.h.
void mockpp::ChainingMockBuilder< AMB >::registerUniqueID | ( | const String & | id, | |
MatchBuilderAdapterBase * | builder | |||
) | [inline] |
Registers a match builder.
id | name of the builder | |
builder | the match builder |
Definition at line 171 of file ChainingMockBuilder.h.
String mockpp::ChainingMockBuilder< AMB >::toString | ( | ) | const [inline, virtual] |
Transform the object's state to a human readable string.
Implements mockpp::DynamicChainingMock< AMB::ReturnType, AMB::InvocationType >.
Definition at line 83 of file ChainingMockBuilder.h.
virtual void mockpp::ChainingMockBuilder< AMB >::verify | ( | ) | [inline, virtual] |
Verify that the expected value is within the allowed bounds.
If it fails, an AssertionFailedError is thrown
Implements mockpp::Verifiable.
Reimplemented in mockpp::ChainableMockMethod0Common< RT >, mockpp::ChainableMockMethod1Common< RT, P1 >, mockpp::ChainableMockMethod2Common< RT, P1, P2 >, mockpp::ChainableMockMethod3Common< RT, P1, P2, P3 >, mockpp::ChainableMockMethod4Common< RT, P1, P2, P3, P4 >, mockpp::ChainableMockMethod5Common< RT, P1, P2, P3, P4, P5 >, mockpp::ChainableMockMethod6Common< RT, P1, P2, P3, P4, P5, P6 >, mockpp::ChainableMockMethod0Common< void >, mockpp::ChainableMockMethod1Common< void, P1 >, mockpp::ChainableMockMethod2Common< void, P1, P2 >, mockpp::ChainableMockMethod3Common< void, P1, P2, P3 >, mockpp::ChainableMockMethod4Common< void, P1, P2, P3, P4 >, mockpp::ChainableMockMethod5Common< void, P1, P2, P3, P4, P5 >, and mockpp::ChainableMockMethod6Common< void, P1, P2, P3, P4, P5, P6 >.
Definition at line 91 of file ChainingMockBuilder.h.