Chaining behaviour of a Chainable Mock Object

Classes

class  mockpp::ArgumentsMatchBuilder0< R, I >
 Build a matcher for an invocation with no arguments. More...
class  mockpp::ArgumentsMatchBuilder1< R, I >
 Build a matcher for an invocation with 1 argument. More...
class  mockpp::ArgumentsMatchBuilder2< R, I >
 Build a matcher for an invocation with 2 argument. More...
class  mockpp::ArgumentsMatchBuilder3< R, I >
 Build a matcher for an invocation with 3 argument. More...
class  mockpp::ArgumentsMatchBuilder4< R, I >
 Build a matcher for an invocation with 4 argument. More...
class  mockpp::ArgumentsMatchBuilder5< R, I >
 Build a matcher for an invocation with 5 argument. More...
class  mockpp::ArgumentsMatchBuilder6< R, I >
 Build a matcher for an invocation with 6 argument. More...
class  mockpp::InvocationMockerBuilder< AMB >
 Builder class for invocation related purposes. More...
class  mockpp::MatchBuilder< R, I >
 Builder class for matcher related purposes. More...
class  mockpp::StubBuilder< R, I >
 Builder class for stub related purposes. More...
class  mockpp::StubBuilder< void, I >
 Partial specialisation for builder class for void stub related purposes. More...
class  mockpp::ChainableMockMethod0Common< RT >
 Common stuff to set up chainable mock method expectations with 0 parameters. More...
class  mockpp::ChainableMockMethod0< RT >
 Set up a chainable mock method expectations with 0 parameters. More...
class  mockpp::ChainableMockMethod0< void >
 Set up a chainable mock method expectations with 0 parameters. More...
class  mockpp::ChainableMockMethod1Common< RT, P1 >
 Common stuff to set up chainable mock method expectations with 1 parameters. More...
class  mockpp::ChainableMockMethod1< RT, P1 >
 Set up a chainable mock method expectations with 1 parameters. More...
class  mockpp::ChainableMockMethod1< void, P1 >
 Set up a chainable mock method expectations with 1 parameters. More...
class  mockpp::ChainableMockMethod2Common< RT, P1, P2 >
 Common stuff to set up chainable mock method expectations with 2 parameters. More...
class  mockpp::ChainableMockMethod2< RT, P1, P2 >
 Set up a chainable mock method expectations with 2 parameters. More...
class  mockpp::ChainableMockMethod2< void, P1, P2 >
 Set up a chainable mock method expectations with 2 parameters. More...
class  mockpp::ChainableMockMethod3Common< RT, P1, P2, P3 >
 Common stuff to set up chainable mock method expectations with 3 parameters. More...
class  mockpp::ChainableMockMethod3< RT, P1, P2, P3 >
 Set up a chainable mock method expectations with 3 parameters. More...
class  mockpp::ChainableMockMethod3< void, P1, P2, P3 >
 Set up a chainable mock method expectations with 3 parameters. More...
class  mockpp::ChainableMockMethod4Common< RT, P1, P2, P3, P4 >
 Common stuff to set up chainable mock method expectations with 4 parameters. More...
class  mockpp::ChainableMockMethod4< RT, P1, P2, P3, P4 >
 Set up a chainable mock method expectations with 4 parameters. More...
class  mockpp::ChainableMockMethod4< void, P1, P2, P3, P4 >
 Set up a chainable mock method expectations with 4 parameters. More...
class  mockpp::ChainableMockMethod5Common< RT, P1, P2, P3, P4, P5 >
 Common stuff to set up chainable mock method expectations with 5 parameters. More...
class  mockpp::ChainableMockMethod5< RT, P1, P2, P3, P4, P5 >
 Set up a chainable mock method expectations with 5 parameters. More...
class  mockpp::ChainableMockMethod5< void, P1, P2, P3, P4, P5 >
 Set up a chainable mock method expectations with 5 parameters. More...
class  mockpp::ChainableMockMethod6Common< RT, P1, P2, P3, P4, P5, P6 >
 Common stuff to set up chainable mock method expectations with 6 parameters. More...
class  mockpp::ChainableMockMethod6< RT, P1, P2, P3, P4, P5, P6 >
 Set up a chainable mock method expectations with 6 parameters. More...
class  mockpp::ChainableMockMethod6< void, P1, P2, P3, P4, P5, P6 >
 Set up a chainable mock method expectations with 6 parameters. More...
class  mockpp::ChainingMockBuilder< AMB >
 Build chaining mocks. More...

Defines

#define MOCKPP_CHAINER_FOR(clsname, methname)   clsname::ChainerFor ## methname
 Implements a chainer for a method.
#define MOCKPP_CHAINER_FOR_EXT(clsname, m_methname, x_methname)   MOCKPP_CHAINER_FOR(clsname, m_methname ## x_methname)
 Implements a chainer for a method.

Functions

MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder0::with ()
 Indicate a matcher for no arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder1::with (const ConstraintHolder< P1 > &p1)
 Indicate a matcher for 1 arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder2::with (const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2)
 Indicate a matcher for 2 arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder3::with (const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2, const ConstraintHolder< P3 > &p3)
 Indicate a matcher for 3 arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder4::with (const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2, const ConstraintHolder< P3 > &p3, const ConstraintHolder< P4 > &p4)
 Indicate a matcher for 4 arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder5::with (const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2, const ConstraintHolder< P3 > &p3, const ConstraintHolder< P4 > &p4, const ConstraintHolder< P5 > &p5)
 Indicate a matcher for 5 arguments.
MatchBuilder< R, I > & mockpp::ArgumentsMatchBuilder6::with (const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2, const ConstraintHolder< P3 > &p3, const ConstraintHolder< P4 > &p4, const ConstraintHolder< P5 > &p5, const ConstraintHolder< P6 > &p6)
 Indicate a matcher for 6 arguments.
void mockpp::InvocationMockerBuilder::id (const String &invocationID)
 Sets the identifier for the expectation.
virtual MatchBuilder & mockpp::MatchBuilder::match (const MatcherHolder< I > &customMatcher)=0
 Adds another matcher.
MatchBuilder< R, I > & mockpp::MatchBuilder::after (const String &priorCallID)
 Adds a matcher indicating subsequent calls on the same mock object.
MatchBuilder< R, I > & mockpp::MatchBuilder::before (const String &subsequentCallID)
 Adds a matcher indicating prior calls on the same mock object.
MatchBuilder< R, I > & mockpp::MatchBuilder::after (BuilderNamespace &otherMock, const String &priorCallID)
 Adds a matcher indicating subsequent calls compared to another mock object.
MatchBuilder< R, I > & mockpp::MatchBuilder::before (BuilderNamespace &otherMock, const String &subsequentCallID)
 Adds a matcher indicating prior calls compared to another mock object.
IdentityBuilder & mockpp::StubBuilder::will (const StubHolder< R, I > &stubAction)
 Sets the stub return data for the invocation.
IdentityBuilder & mockpp::StubBuilder< void, I >::will (const StubHolder< void, I > &stubAction)
 Sets the stub return data for the invocation.
InvocationMockerBuilder< AMB > & mockpp::ChainingMockBuilder::stubs ()
 Stubs an invocation.
InvocationMockerBuilder< AMB > & mockpp::ChainingMockBuilder::stubs (const MatcherHolder< I > &customMatcher)
 Stubs an invocation.
InvocationMockerBuilder< AMB > & mockpp::ChainingMockBuilder::expects (const MatcherHolder< I > &expectation)
 Expects an invocation.
virtual void mockpp::ChainingMockBuilder::setDefaultStub (const mockpp::StubHolder< R, I > &newDefaultStub)
 Sets the default stub for the object.

Define Documentation

#define MOCKPP_CHAINER_FOR ( clsname,
methname   )     clsname::ChainerFor ## methname

Implements a chainer for a method.

Serves also as a backwards compatibility macro.

Parameters:
clsname the chainable mock object class name
methname the method for which you create the chainer

Definition at line 190 of file ChainableMockObject.h.

#define MOCKPP_CHAINER_FOR_EXT ( clsname,
m_methname,
x_methname   )     MOCKPP_CHAINER_FOR(clsname, m_methname ## x_methname)

Implements a chainer for a method.

Parameters:
clsname the chainable mock object class name
m_methname the method for which you create the chainer
x_methname optional extension for the internal names based on the method name

Definition at line 199 of file ChainableMockObject.h.


Function Documentation

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::MatchBuilder< R, I >::after ( BuilderNamespace otherMock,
const String priorCallID 
) [inline, inherited]

Adds a matcher indicating subsequent calls compared to another mock object.

Parameters:
otherMock pointer to the other mock object
priorCallID identifier of the prior call on another object
Returns:
the builder object

Definition at line 127 of file MatchBuilder.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::MatchBuilder< R, I >::after ( const String priorCallID  )  [inline, inherited]

Adds a matcher indicating subsequent calls on the same mock object.

Parameters:
priorCallID identifier of the prior call
Returns:
the builder object

Definition at line 104 of file MatchBuilder.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::MatchBuilder< R, I >::before ( BuilderNamespace otherMock,
const String subsequentCallID 
) [inline, inherited]

Adds a matcher indicating prior calls compared to another mock object.

Parameters:
otherMock pointer to the other mock object
subsequentCallID identifier of the prior call on another object
Returns:
the builder object

Definition at line 139 of file MatchBuilder.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::MatchBuilder< R, I >::before ( const String subsequentCallID  )  [inline, inherited]

Adds a matcher indicating prior calls on the same mock object.

Parameters:
subsequentCallID identifier of the prior call on another object
Returns:
the builder object

Definition at line 115 of file MatchBuilder.h.

template<typename AMB>
InvocationMockerBuilder<AMB>& mockpp::ChainingMockBuilder< AMB >::expects ( const MatcherHolder< I > &  expectation  )  [inline, inherited]

Expects an invocation.

Parameters:
expectation pointer to matcher data
Returns:
the temporary builder object

Definition at line 128 of file ChainingMockBuilder.h.

template<typename AMB>
void mockpp::InvocationMockerBuilder< AMB >::id ( const String invocationID  )  [inline, inherited]

Sets the identifier for the expectation.

Parameters:
invocationID identifier for the expectation

Definition at line 100 of file InvocationMockerBuilder.h.

template<typename R, typename I>
virtual MatchBuilder& mockpp::MatchBuilder< R, I >::match ( const MatcherHolder< I > &  customMatcher  )  [pure virtual, inherited]

Adds another matcher.

Parameters:
customMatcher the matcher object
Returns:
the builder object
template<typename AMB>
virtual void mockpp::ChainingMockBuilder< AMB >::setDefaultStub ( const mockpp::StubHolder< R, I > &  newDefaultStub  )  [inline, virtual, inherited]

Sets the default stub for the object.

Parameters:
newDefaultStub pointer to the default stub

Implements mockpp::DynamicChainingMock< AMB::ReturnType, AMB::InvocationType >.

Definition at line 139 of file ChainingMockBuilder.h.

template<typename AMB>
InvocationMockerBuilder<AMB>& mockpp::ChainingMockBuilder< AMB >::stubs ( const MatcherHolder< I > &  customMatcher  )  [inline, inherited]

Stubs an invocation.

Parameters:
customMatcher pointer to matcher data
Returns:
the temporary builder object

Definition at line 118 of file ChainingMockBuilder.h.

template<typename AMB>
InvocationMockerBuilder<AMB>& mockpp::ChainingMockBuilder< AMB >::stubs (  )  [inline, inherited]

Stubs an invocation.

Returns:
the temporary builder object

Definition at line 108 of file ChainingMockBuilder.h.

template<typename I >
IdentityBuilder& mockpp::StubBuilder< void, I >::will ( const StubHolder< void, I > &  stubAction  )  [inline, inherited]

Sets the stub return data for the invocation.

Parameters:
stubAction data to return
Returns:
the builder object

Definition at line 116 of file StubBuilder.h.

template<typename R , typename I >
IdentityBuilder& mockpp::StubBuilder< R, I >::will ( const StubHolder< R, I > &  stubAction  )  [inline, inherited]

Sets the stub return data for the invocation.

Parameters:
stubAction data to return
Returns:
the builder object

Definition at line 77 of file StubBuilder.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder6< R, I >::with ( const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2,
const ConstraintHolder< P3 > &  p3,
const ConstraintHolder< P4 > &  p4,
const ConstraintHolder< P5 > &  p5,
const ConstraintHolder< P6 > &  p6 
) [inline, inherited]

Indicate a matcher for 6 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
p2 pointer to the constraint for method parameter 2
p3 pointer to the constraint for method parameter 3
p4 pointer to the constraint for method parameter 4
p5 pointer to the constraint for method parameter 5
p6 pointer to the constraint for method parameter 6
Returns:
the builder object

Definition at line 317 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder5< R, I >::with ( const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2,
const ConstraintHolder< P3 > &  p3,
const ConstraintHolder< P4 > &  p4,
const ConstraintHolder< P5 > &  p5 
) [inline, inherited]

Indicate a matcher for 5 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
p2 pointer to the constraint for method parameter 2
p3 pointer to the constraint for method parameter 3
p4 pointer to the constraint for method parameter 4
p5 pointer to the constraint for method parameter 5
Returns:
the builder object

Definition at line 261 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder4< R, I >::with ( const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2,
const ConstraintHolder< P3 > &  p3,
const ConstraintHolder< P4 > &  p4 
) [inline, inherited]

Indicate a matcher for 4 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
p2 pointer to the constraint for method parameter 2
p3 pointer to the constraint for method parameter 3
p4 pointer to the constraint for method parameter 4
Returns:
the builder object

Definition at line 208 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder3< R, I >::with ( const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2,
const ConstraintHolder< P3 > &  p3 
) [inline, inherited]

Indicate a matcher for 3 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
p2 pointer to the constraint for method parameter 2
p3 pointer to the constraint for method parameter 3
Returns:
the builder object

Definition at line 158 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder2< R, I >::with ( const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2 
) [inline, inherited]

Indicate a matcher for 2 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
p2 pointer to the constraint for method parameter 2
Returns:
the builder object

Definition at line 111 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder1< R, I >::with ( const ConstraintHolder< P1 > &  p1  )  [inline, inherited]

Indicate a matcher for 1 arguments.

Parameters:
p1 pointer to the constraint for method parameter 1
Returns:
the builder object

Definition at line 67 of file ArgumentsMatchBuilderN.h.

template<typename R, typename I>
MatchBuilder<R, I>& mockpp::ArgumentsMatchBuilder0< R, I >::with (  )  [inline, inherited]

Indicate a matcher for no arguments.

Returns:
the builder object

Definition at line 72 of file ArgumentsMatchBuilder.h.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:48:57 2010 for mockpp by  doxygen 1.6.1