mockpp::TestFailureMatcher Class Reference
[Matchers]

An invocation count matcher that always fails upon invocation. More...

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

List of all members.

Public Member Functions

 TestFailureMatcher (const String &msg)
 Creates the object.
virtual bool matches ()
 Checks if an invocation matches the expectaton.
virtual bool hasDescription ()
 Does the object provide meaningful description via describeTo() ?.
virtual void incInvoked ()
 Increments the invocation count.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.
virtual void verify ()
 Verify that the expected value is within the allowed bounds.

Detailed Description

An invocation count matcher that always fails upon invocation.

See also:
mockpp::never

Definition at line 50 of file TestFailureMatcher.h.


Constructor & Destructor Documentation

mockpp::TestFailureMatcher::TestFailureMatcher ( const String msg  ) 

Creates the object.

Parameters:
msg string to describe the failure

Definition at line 44 of file TestFailureMatcher.cpp.


Member Function Documentation

String mockpp::TestFailureMatcher::describeTo ( String buffer  )  const [virtual]

Appends the description of this object to the buffer.

Parameters:
buffer The buffer that the description is appended to.
Returns:
The current content of the buffer data

Implements mockpp::SelfDescribing.

Definition at line 68 of file TestFailureMatcher.cpp.

bool mockpp::TestFailureMatcher::hasDescription (  )  [virtual]

Does the object provide meaningful description via describeTo() ?.

Returns:
true: description is available

Implements mockpp::TypelessMatcher.

Definition at line 56 of file TestFailureMatcher.cpp.

void mockpp::TestFailureMatcher::incInvoked (  )  [virtual]

Increments the invocation count.

Actually the invocation always fails.

Implements mockpp::TypelessMatcher.

Definition at line 62 of file TestFailureMatcher.cpp.

bool mockpp::TestFailureMatcher::matches (  )  [virtual]

Checks if an invocation matches the expectaton.

Returns:
true: the invocation matches

Implements mockpp::TypelessMatcher.

Definition at line 50 of file TestFailureMatcher.cpp.

void mockpp::TestFailureMatcher::verify (  )  [virtual]

Verify that the expected value is within the allowed bounds.

If it fails, an AssertionFailedError is thrown

Implements mockpp::Verifiable.

Definition at line 75 of file TestFailureMatcher.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:08 2010 for mockpp by  doxygen 1.6.1