CppUnit project page | FAQ

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

TestFixtureFactory.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
2 #define CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
3
4 #include <cppunit/Portability.h>
5
6
7 CPPUNIT_NS_BEGIN
8
9
10 class TestFixture;
11
16 class TestFixtureFactory
17 {
18 public:
20 virtual TestFixture *makeFixture() =0;
21
22 virtual ~TestFixtureFactory() {}
23 };
24
25
30 template<class TestFixtureType>
31 class ConcretTestFixtureFactory : public CPPUNIT_NS::TestFixtureFactory
32 {
39 TestFixture *makeFixture()
40 {
41 return new TestFixtureType();
42 }
43 };
44
45
46 CPPUNIT_NS_END
47
48
49 #endif // CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
50
TestFixture
Wraps a test case with setUp and tearDown methods.A TestFixture is used to provide a common environme...
Definition: TestFixture.h:83
ConcretTestFixtureFactory::makeFixture
TestFixture * makeFixture()
Returns a new TestFixture instance.
Definition: TestFixtureFactory.h:39
TestFixtureFactory::~TestFixtureFactory
virtual ~TestFixtureFactory()
Definition: TestFixtureFactory.h:22
Portability.h
TestFixtureFactory
Abstract TestFixture factory (Implementation).
Definition: TestFixtureFactory.h:16
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
ConcretTestFixtureFactory
Concret TestFixture factory (Implementation).
Definition: TestFixtureFactory.h:31
TestFixtureFactory::makeFixture
virtual TestFixture * makeFixture()=0
Creates a new TestFixture instance.

| Send comments to: CppUnit Developers