2012-04-29 20:52:25 +02:00
|
|
|
//
|
|
|
|
// TestSetup.h
|
|
|
|
//
|
|
|
|
|
|
|
|
|
2016-01-06 13:48:48 +01:00
|
|
|
#ifndef Poco_CppUnit_TestSetup_INCLUDED
|
|
|
|
#define Poco_CppUnit_TestSetup_INCLUDED
|
2012-04-29 20:52:25 +02:00
|
|
|
|
|
|
|
|
2016-01-06 13:48:48 +01:00
|
|
|
#include "Poco/CppUnit/CppUnit.h"
|
|
|
|
#include "Poco/CppUnit/Guards.h"
|
|
|
|
#include "Poco/CppUnit/TestDecorator.h"
|
2012-04-29 20:52:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
namespace CppUnit {
|
|
|
|
|
|
|
|
|
|
|
|
class Test;
|
|
|
|
class TestResult;
|
|
|
|
|
|
|
|
|
2016-01-08 00:17:13 +01:00
|
|
|
class CppUnit_API TestSetup: public TestDecorator
|
2012-04-29 20:52:25 +02:00
|
|
|
{
|
|
|
|
REFERENCEOBJECT (TestSetup)
|
|
|
|
|
|
|
|
public:
|
|
|
|
TestSetup(Test* test): TestDecorator(test)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void run(TestResult* result);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void setUp()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void tearDown()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline void TestSetup::run(TestResult* result)
|
|
|
|
{
|
|
|
|
setUp();
|
|
|
|
TestDecorator::run(result);
|
|
|
|
tearDown();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace CppUnit
|
|
|
|
|
|
|
|
|
2016-01-06 13:48:48 +01:00
|
|
|
#endif // Poco_CppUnit_TestSetup_INCLUDED
|