VerifyingTestCaller.h File Reference

Unit VerifyingTestCaller with verification. More...

Go to the source code of this file.

Classes

class  mockpp::VerifyingTestCaller< VerifyingFixtureType, DoTheVerify >
 VerifyingTestCaller that verifies Verifiable fields and registered Verifiable objects after the test has run and before the fixture has been torn down. More...

Namespaces

namespace  mockpp
 

Namespace for project "Mock Objects for C++".


Defines

#define MOCKPP_VERIFYING_TEST(testMethod)
 Add a method to the suite and verify after its run.
#define MOCKPP_TEST(testMethod)
 Add a method to the suite (but do NOT verify after its run).
#define MOCKPP_VERIFYING_TEST_EXCEPTION(testMethod, ExceptionType)
 Add a test which verifies after its run and fails if the specified exception is not caught.
#define MOCKPP_TEST_EXCEPTION(testMethod, ExceptionType)
 Add a test (which does NOT verify after its run) and fails if the specified exception is not caught.

Detailed Description

Unit VerifyingTestCaller with verification.

Id
VerifyingTestCaller.h 1491 2010-01-02 22:21:45Z ewald-arnold

Definition in file VerifyingTestCaller.h.


Define Documentation

#define MOCKPP_TEST ( testMethod   ) 
Value:
CPPUNIT_TEST_SUITE_ADD_TEST(  \
        ( new MOCKPP_NS::VerifyingTestCaller<TestFixtureType, false>( \
                  context.getTestNameFor( #testMethod),   \
                  &TestFixtureType::testMethod,           \
                  context.makeFixture() ) ) )

Add a method to the suite (but do NOT verify after its run).

Substitutes CPPUNIT_TEST.

Parameters:
testMethod Name of the method of the test case to add to the suite. The signature of the method must be of type: void testMethod();
See also:
CPPUNIT_TEST.

Definition at line 157 of file VerifyingTestCaller.h.

#define MOCKPP_TEST_EXCEPTION ( testMethod,
ExceptionType   ) 
Value:
CPPUNIT_TEST_SUITE_ADD_TEST(                                        \
      (new ::CppUnit::ExceptionTestCaseDecorator< ExceptionType >(      \
          new MOCKPP_NS::VerifyingTestCaller< TestFixtureType, false >(  \
                               context.getTestNameFor( #testMethod ), \
                               &TestFixtureType::testMethod,          \
                               context.makeFixture() ) ) ) )

Add a test (which does NOT verify after its run) and fails if the specified exception is not caught.

Substitutes CPPUNIT_TEST_EXCEPTION.

Parameters:
testMethod Name of the method of the test case to add to the suite.
ExceptionType Type of the exception that must be thrown by the test method.
See also:
CPPUNIT_TEST_EXCEPTION.
Deprecated:
Use one of the assertion macros like MOCKPP_ASSERT_THROWING instead.

Definition at line 192 of file VerifyingTestCaller.h.

#define MOCKPP_VERIFYING_TEST ( testMethod   ) 
Value:
CPPUNIT_TEST_SUITE_ADD_TEST(  \
        ( new MOCKPP_NS::VerifyingTestCaller<TestFixtureType, true>( \
                  context.getTestNameFor( #testMethod),   \
                  &TestFixtureType::testMethod,           \
                  context.makeFixture() ) ) )

Add a method to the suite and verify after its run.

Substitutes CPPUNIT_TEST for cases where you wish to call verify() automatically after test completion.

Parameters:
testMethod Name of the method of the test case to add to the suite. The signature of the method must be of type: void testMethod();
See also:
CPPUNIT_TEST.

Definition at line 142 of file VerifyingTestCaller.h.

#define MOCKPP_VERIFYING_TEST_EXCEPTION ( testMethod,
ExceptionType   ) 
Value:
CPPUNIT_TEST_SUITE_ADD_TEST(                                        \
      (new ::CppUnit::ExceptionTestCaseDecorator< ExceptionType >(      \
          new MOCKPP_NS::VerifyingTestCaller< TestFixtureType, true >(   \
                               context.getTestNameFor( #testMethod ), \
                               &TestFixtureType::testMethod,          \
                               context.makeFixture() ) ) ) )

Add a test which verifies after its run and fails if the specified exception is not caught.

Substitutes CPPUNIT_TEST_EXCEPTION for cases where you wish to call verify() automatically after test completion.

Parameters:
testMethod Name of the method of the test case to add to the suite.
ExceptionType Type of the exception that must be thrown by the test method.
See also:
CPPUNIT_TEST_EXCEPTION.
Deprecated:
Use one of the assertion macros like MOCKPP_ASSERT_THROWING instead.

Definition at line 175 of file VerifyingTestCaller.h.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:48:57 2010 for mockpp by  doxygen 1.6.1