Utils::CalitkoMocks::ExpectedFunctionBase Class Reference

#include <ExpectedFunction.h> [code]

List of all members.


Detailed Description

Base functionality for the ExpectedFunction template.

Todo:
Add tests for numberOfTimes() - it is now only tested in "real" tests.

Definition at line 41 of file ExpectedFunction.h.

Public Member Functions

 ExpectedFunctionBase ()
virtual ~ExpectedFunctionBase ()
void addCall (auto_ptr< BoundFunctionBase >)
void setContext (const std::string &expectationString_, const SourceLine &sourceLine_)
void verifyChecked ()
void setNumberOfTimesShouldBeInvoked (int from, int to)
bool isLastExpectedCall ()
bool wasVerified ()

Protected Member Functions

void fail (const std::string &reason)
void callAll ()
void stopWaiting ()
 Causes the event loop entered by wait() to be exitted once a mock is called.

Protected Attributes

int timesInvoked

Private Types

typedef std::list< BoundFunctionBase * > Calls

Private Attributes

bool verifyCheckedWasCalled
Calls calls
std::string expectationString
SourceLine sourceLine
int minTimesInvoked
int maxTimesInvoked


Member Typedef Documentation

typedef std::list<BoundFunctionBase *> Utils::CalitkoMocks::ExpectedFunctionBase::Calls [private]
 

Definition at line 63 of file ExpectedFunction.h.


Constructor & Destructor Documentation

ExpectedFunctionBase::ExpectedFunctionBase  ) 
 

Definition at line 30 of file ExpectedFunction.cpp.

ExpectedFunctionBase::~ExpectedFunctionBase  )  [virtual]
 

Definition at line 37 of file ExpectedFunction.cpp.


Member Function Documentation

void ExpectedFunctionBase::addCall auto_ptr< BoundFunctionBase  ) 
 

Definition at line 95 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::callAll  )  [protected]
 

Definition at line 101 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::fail const std::string &  reason  )  [protected]
 

Definition at line 87 of file ExpectedFunction.cpp.

bool ExpectedFunctionBase::isLastExpectedCall  ) 
 

Definition at line 82 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::setContext const std::string &  expectationString_,
const SourceLine &  sourceLine_
 

Definition at line 45 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::setNumberOfTimesShouldBeInvoked int  from,
int  to
 

Definition at line 76 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::stopWaiting  )  [protected]
 

Causes the event loop entered by wait() to be exitted once a mock is called.

Definition at line 109 of file ExpectedFunction.cpp.

void ExpectedFunctionBase::verifyChecked  ) 
 

Definition at line 52 of file ExpectedFunction.cpp.

bool ExpectedFunctionBase::wasVerified  ) 
 

Definition at line 71 of file ExpectedFunction.cpp.


Member Data Documentation

Calls Utils::CalitkoMocks::ExpectedFunctionBase::calls [private]
 

Definition at line 66 of file ExpectedFunction.h.

std::string Utils::CalitkoMocks::ExpectedFunctionBase::expectationString [private]
 

Definition at line 67 of file ExpectedFunction.h.

int Utils::CalitkoMocks::ExpectedFunctionBase::maxTimesInvoked [private]
 

Definition at line 70 of file ExpectedFunction.h.

int Utils::CalitkoMocks::ExpectedFunctionBase::minTimesInvoked [private]
 

Definition at line 69 of file ExpectedFunction.h.

SourceLine Utils::CalitkoMocks::ExpectedFunctionBase::sourceLine [private]
 

Definition at line 68 of file ExpectedFunction.h.

int Utils::CalitkoMocks::ExpectedFunctionBase::timesInvoked [protected]
 

Definition at line 72 of file ExpectedFunction.h.

bool Utils::CalitkoMocks::ExpectedFunctionBase::verifyCheckedWasCalled [private]
 

Definition at line 65 of file ExpectedFunction.h.


The documentation for this class was generated from the following files: