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. |
Unit VerifyingTestCaller with verification.
Definition in file VerifyingTestCaller.h.
#define MOCKPP_TEST | ( | testMethod | ) |
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.
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(); |
Definition at line 157 of file VerifyingTestCaller.h.
#define MOCKPP_TEST_EXCEPTION | ( | testMethod, | |||
ExceptionType | ) |
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.
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. |
Definition at line 192 of file VerifyingTestCaller.h.
#define MOCKPP_VERIFYING_TEST | ( | testMethod | ) |
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.
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(); |
Definition at line 142 of file VerifyingTestCaller.h.
#define MOCKPP_VERIFYING_TEST_EXCEPTION | ( | testMethod, | |||
ExceptionType | ) |
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.
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. |
Definition at line 175 of file VerifyingTestCaller.h.