mockpp::VisitableMockMethod2< R, P1, P2 > Class Template Reference
[Controlling behaviour of a Visitable Mock Object]

Set up visitable mock method expectations with 2 parameters. More...

Inheritance diagram for mockpp::VisitableMockMethod2< R, P1, P2 >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 VisitableMockMethod2 (const String &name, VisitableMockObject *parent)
 Constructs the mock object.
forward (const P1 &p1, const P2 &p2) const
 Actually verifies the mocked method.
void addResponseValue (const R &rv, const P1 &p1, const P2 &p2, unsigned count=MOCKPP_UNLIMITED)
 Adds another response value.
void addResponseValue (const R &rv, const ConstraintHolder< P1 > &p1, const ConstraintHolder< P2 > &p2, unsigned count=MOCKPP_UNLIMITED)
 Adds another response value.

Detailed Description

template<typename R, typename P1, typename P2>
class mockpp::VisitableMockMethod2< R, P1, P2 >

Set up visitable mock method expectations with 2 parameters.

Definition at line 161 of file VisitableMockMethod2.h.


Constructor & Destructor Documentation

template<typename R , typename P1 , typename P2 >
mockpp::VisitableMockMethod2< R, P1, P2 >::VisitableMockMethod2 ( const String name,
VisitableMockObject parent 
) [inline]

Constructs the mock object.

Parameters:
name human readable description about the expectation
parent parent Visitable mock object

Definition at line 170 of file VisitableMockMethod2.h.


Member Function Documentation

template<typename R , typename P1 , typename P2 >
void mockpp::VisitableMockMethod2< R, P1, P2 >::addResponseValue ( const R &  rv,
const ConstraintHolder< P1 > &  p1,
const ConstraintHolder< P2 > &  p2,
unsigned  count = MOCKPP_UNLIMITED 
) [inline]

Adds another response value.

Response values are determined on the parameters you pass. This way the object returns a value that is totally based on the input.

Parameters:
rv the return value
p1 mock method parameter 1
p2 mock method parameter 2
count the number of times this value shall be returned. Default is unlimited.

Definition at line 232 of file VisitableMockMethod2.h.

template<typename R , typename P1 , typename P2 >
void mockpp::VisitableMockMethod2< R, P1, P2 >::addResponseValue ( const R &  rv,
const P1 &  p1,
const P2 &  p2,
unsigned  count = MOCKPP_UNLIMITED 
) [inline]

Adds another response value.

Response values are determined on the parameters you pass. This way the object returns a value that is totally based on the input.

Parameters:
rv the return value
p1 mock method parameter 1
p2 mock method parameter 2
count the number of times this value shall be returned. Default is unlimited.

Definition at line 218 of file VisitableMockMethod2.h.

template<typename R , typename P1 , typename P2 >
R mockpp::VisitableMockMethod2< R, P1, P2 >::forward ( const P1 &  p1,
const P2 &  p2 
) const [inline]

Actually verifies the mocked method.

Must be called by the client code.

Parameters:
p1 mock method parameter 1
p2 mock method parameter 2

Definition at line 181 of file VisitableMockMethod2.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:49:16 2010 for mockpp by  doxygen 1.6.1