mockpp::ChainableMockObjectBase Class Reference
[Advanced Mock Objects]

Base for a generic object that can be used to replace a real world object for testing purposes. More...

Inheritance diagram for mockpp::ChainableMockObjectBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ChainableMockObjectBase (const String &name)
 Construct the item.
virtual ~ChainableMockObjectBase ()
 Destruct the item.
MatchBuilderAdapterBaselookupID (const String &id) const
 Searches a name.
void registerUniqueID (const String &id, MatchBuilderAdapterBase *builder)
 Registers another match builder under its unique identifier.
virtual void storeBuilder (AutoPointer< MatchBuilderAdapterBase > builder)
 Stores a builder object.
virtual void addPendingRecorder (const String &id, InvokedRecorder::AP recorder)
 Stores another recorder object for later use.
void checkPendingRecorders () const
 Checks if there are any pending recorders left.

Protected Member Functions

void chainableVerify ()
 Verifies the object and the mock objects it contains.
virtual void chainableReset ()
 Frees all internal data.

Detailed Description

Base for a generic object that can be used to replace a real world object for testing purposes.

It emulates the real world behaviour by feeding it "chained expectations".

Definition at line 57 of file ChainableMockObject.h.


Constructor & Destructor Documentation

mockpp::ChainableMockObjectBase::ChainableMockObjectBase ( const String name  ) 

Construct the item.

Parameters:
name human readable description about the object

Definition at line 42 of file ChainableMockObject.cpp.


Member Function Documentation

void mockpp::ChainableMockObjectBase::chainableVerify (  )  [protected]

Verifies the object and the mock objects it contains.

If it fails, an AssertionFailedError is thrown

Definition at line 54 of file ChainableMockObject.cpp.

void mockpp::ChainableMockObjectBase::checkPendingRecorders (  )  const

Checks if there are any pending recorders left.

If there are, an exception is throw.

Definition at line 60 of file ChainableMockObject.cpp.


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

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