mockpp::ReturnObjectListStub< R > Class Template Reference
[Stubs]

Stub returning a list of defined values. More...

Inheritance diagram for mockpp::ReturnObjectListStub< R >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ReturnObjectListStub (const R &result, const String &name=MOCKPP_PCHAR(""), VerifiableList *parent=0)
 Creates the object.
template<class I >
 ReturnObjectListStub (I items, I end, const String &name=MOCKPP_PCHAR(""), VerifiableList *parent=0)
 Creates the object based on a list of return values.
virtual void verify ()
 Throws an AssertionFailedException if any expectations have not been met.
virtual void reset ()
 Sets all internal data to the state after construction.
void addObjectToReturn (const R &retArg)
 Adds another return value.
template<class I >
ReturnObjectListStubaddObjectToReturn (I items, I end)
 Add a sequence of next objects to the end of the list.
virtual R typelessInvoke ()
 Mock the invocation without passing parameters.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.

Detailed Description

template<typename R>
class mockpp::ReturnObjectListStub< R >

Stub returning a list of defined values.

This object is also a Verfiable since there might be the need to verify the use of all objects fed to it in the end.

See also:
mockpp::returnValue

Definition at line 54 of file ReturnObjectListStub.h.


Constructor & Destructor Documentation

template<typename R>
mockpp::ReturnObjectListStub< R >::ReturnObjectListStub ( const R &  result,
const String name = MOCKPP_PCHAR(""),
VerifiableList parent = 0 
) [inline]

Creates the object.

Parameters:
result the return value
name human readable description about the expectation
parent parent verifiable

Definition at line 64 of file ReturnObjectListStub.h.

template<typename R>
template<class I >
mockpp::ReturnObjectListStub< R >::ReturnObjectListStub ( items,
end,
const String name = MOCKPP_PCHAR(""),
VerifiableList parent = 0 
) [inline]

Creates the object based on a list of return values.

Parameters:
items start iterator
end terminating iterator (note: one element "behind" as always with STL)
name human readable description about the expectation
parent parent verifiable

Definition at line 78 of file ReturnObjectListStub.h.


Member Function Documentation

template<typename R>
template<class I >
ReturnObjectListStub& mockpp::ReturnObjectListStub< R >::addObjectToReturn ( items,
end 
) [inline]

Add a sequence of next objects to the end of the list.

Parameters:
items start iterator
end terminating iterator (note: one element "behind" as always with STL)
Returns:
reference to itself for chaining

Definition at line 114 of file ReturnObjectListStub.h.

template<typename R>
void mockpp::ReturnObjectListStub< R >::addObjectToReturn ( const R &  retArg  )  [inline]

Adds another return value.

Parameters:
retArg the next value to return

Definition at line 103 of file ReturnObjectListStub.h.

template<typename R>
virtual String mockpp::ReturnObjectListStub< R >::describeTo ( String buffer  )  const [inline, virtual]

Appends the description of this object to the buffer.

Parameters:
buffer The buffer that the description is appended to.
Returns:
The current content of the buffer data

Implements mockpp::TypelessStub< R >.

Definition at line 133 of file ReturnObjectListStub.h.

template<typename R>
virtual R mockpp::ReturnObjectListStub< R >::typelessInvoke (  )  [inline, virtual]

Mock the invocation without passing parameters.

Returns:
return value from mocked invocation

Implements mockpp::TypelessStub< R >.

Definition at line 124 of file ReturnObjectListStub.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:03 2010 for mockpp by  doxygen 1.6.1