Stub returning a list of defined values. More...
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 > | |
ReturnObjectListStub & | addObjectToReturn (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. |
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.
Definition at line 54 of file ReturnObjectListStub.h.
mockpp::ReturnObjectListStub< R >::ReturnObjectListStub | ( | const R & | result, | |
const String & | name = MOCKPP_PCHAR("") , |
|||
VerifiableList * | parent = 0 | |||
) | [inline] |
Creates the object.
result | the return value | |
name | human readable description about the expectation | |
parent | parent verifiable |
Definition at line 64 of file ReturnObjectListStub.h.
mockpp::ReturnObjectListStub< R >::ReturnObjectListStub | ( | I | items, | |
I | end, | |||
const String & | name = MOCKPP_PCHAR("") , |
|||
VerifiableList * | parent = 0 | |||
) | [inline] |
Creates the object based on a list of return values.
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.
ReturnObjectListStub& mockpp::ReturnObjectListStub< R >::addObjectToReturn | ( | I | items, | |
I | end | |||
) | [inline] |
Add a sequence of next objects to the end of the list.
items | start iterator | |
end | terminating iterator (note: one element "behind" as always with STL) |
Definition at line 114 of file ReturnObjectListStub.h.
void mockpp::ReturnObjectListStub< R >::addObjectToReturn | ( | const R & | retArg | ) | [inline] |
Adds another return value.
retArg | the next value to return |
Definition at line 103 of file ReturnObjectListStub.h.
virtual String mockpp::ReturnObjectListStub< R >::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::TypelessStub< R >.
Definition at line 133 of file ReturnObjectListStub.h.
virtual R mockpp::ReturnObjectListStub< R >::typelessInvoke | ( | ) | [inline, virtual] |
Mock the invocation without passing parameters.
Implements mockpp::TypelessStub< R >.
Definition at line 124 of file ReturnObjectListStub.h.