mockpp::Expectation Class Reference

An Expectation is an object that we set up at the beginning of a unit test to expect certain things to happen to it. More...

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

List of all members.

Public Member Functions

 Expectation (const String &name, VerifiableList *parent)
 Constructs the expectation.
virtual bool hasExpectations () const =0
 Tests if any expectations have been set on this object.
virtual void setExpectNothing ()=0
 Tell the object to expect nothing to happen to it, perhaps because the test is exercising the handling of an error.
virtual void setFailOnVerify ()=0
 If an incorrect actual value is set, defer reporting this as a failure until verify() is called on this object.

Detailed Description

An Expectation is an object that we set up at the beginning of a unit test to expect certain things to happen to it.

If it is possible to tell, the Expectation will fail as soon as an incorrect value has been set.

Call verify() at the end of a unit test to check for missing or incomplete values.

If no expectations have been set on the object, then no checking will be done and verify() will do nothing.

Definition at line 66 of file Expectation.h.


Constructor & Destructor Documentation

mockpp::Expectation::Expectation ( const String name,
VerifiableList parent 
) [inline]

Constructs the expectation.

Parameters:
name human readable description about the expectation
parent parent verifiable

Definition at line 75 of file Expectation.h.


Member Function Documentation

virtual bool mockpp::Expectation::hasExpectations (  )  const [pure virtual]
virtual void mockpp::Expectation::setExpectNothing (  )  [pure virtual]

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:48:58 2010 for mockpp by  doxygen 1.6.1