#include <ExpectationsList.h> [code]
Inheritance diagram for Utils::CalitkoMocks::ExpectationsList< Function >:

An object of an template instantiation of this class will be created for each function that a Mock class is supposed to mock. This class provides the functions add() and take() which perfectly suite our needs for the times when we need to create and verify and expectation:
// Devlare the expectations list object: ExpectationsList <ExpectedFunction <int (int)> > expectations_foo; ... // Add and expected function call to the list: expectations_foo.add (new ExpectedFunction <int (int)> (3) // adds the new // object to the list and returns a reference to it .willReturn (1); // stub the return value of the function ... // Check the expected function call: expectations_foo.take() // removes the function from the list and returns it .check (3); // compares the expected with the compared value and // returns the stubbed value
Definition at line 59 of file ExpectationsList.h.
Public Member Functions | |
| ExpectationsList () | |
| ~ExpectationsList () | |
| bool | empty () |
| Function & | add (auto_ptr< Function > foo) |
| Function & | take () |
Private Member Functions | |
| ExpectationsList (const ExpectationsList &) | |
| ExpectationsList & | operator= (const ExpectationsList &) |
Private Attributes | |
| std::list< Function * > | added |
| std::list< Function * > | taken |
|
|||||||||
|
Definition at line 62 of file ExpectationsList.h. |
|
|||||||||
|
Definition at line 67 of file ExpectationsList.h. |
|
||||||||||
|
|
|
||||||||||
|
Definition at line 84 of file ExpectationsList.h. |
|
|||||||||
|
Definition at line 79 of file ExpectationsList.h. |
|
||||||||||
|
|
|
|||||||||
|
Definition at line 92 of file ExpectationsList.h. |
|
|||||
|
Definition at line 116 of file ExpectationsList.h. |
|
|||||
|
Definition at line 117 of file ExpectationsList.h. |