00001 #ifndef CPPUNIT_EXTENSIONS_TESTSETUP_H
00002 #define CPPUNIT_EXTENSIONS_TESTSETUP_H
00003
00004 #include <cppunit/extensions/TestDecorator.h>
00005
00006 namespace CppUnit {
00007
00008 class Test;
00009 class TestResult;
00010
00011
00012 class TestSetUp : public TestDecorator
00013 {
00014 public:
00015 TestSetUp (Test *test) : TestDecorator (test) {}
00016
00017 void run (TestResult *result);
00018
00019 protected:
00020 virtual void setUp () {}
00021 virtual void tearDown () {}
00022
00023 private:
00024 TestSetUp( const TestSetUp & );
00025 void operator =( const TestSetUp & );
00026 };
00027
00028
00029 inline void
00030 TestSetUp::run (TestResult *result)
00031 {
00032 setUp ();
00033 TestDecorator::run (result);
00034 tearDown ();
00035 }
00036
00037
00038 }
00039
00040 #endif // CPPUNIT_EXTENSIONS_TESTSETUP_H
00041