1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#ifndef TESTTEST_H
#define TESTTEST_H
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestSuite.h>
#include <cppunit/TestPath.h>
#include "MockTestCase.h"
#include <stdexcept>
/*! \class TestTest
* \brief Unit test for class Test.
*/
class TestTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( TestTest );
CPPUNIT_TEST( testFindTestPathPointerThis );
CPPUNIT_TEST( testFindTestPathPointer );
CPPUNIT_TEST( testFindTestPathPointerFail );
CPPUNIT_TEST( testFindTestPathNameThis );
CPPUNIT_TEST( testFindTestPathName );
CPPUNIT_TEST( testFindTestPathNameFail );
CPPUNIT_TEST( testFindTest );
CPPUNIT_TEST_EXCEPTION( testFindTestThrow, std::invalid_argument );
CPPUNIT_TEST( testResolveTestPath );
CPPUNIT_TEST_SUITE_END();
public:
/*! Constructs a TestTest object.
*/
TestTest();
/// Destructor.
virtual ~TestTest();
void setUp();
void tearDown();
void testFindTestPathPointerThis();
void testFindTestPathPointer();
void testFindTestPathPointerFail();
void testFindTestPathNameThis();
void testFindTestPathName();
void testFindTestPathNameFail();
void testFindTest();
void testFindTestThrow();
void testResolveTestPath();
private:
/// Prevents the use of the copy constructor.
TestTest( const TestTest © );
/// Prevents the use of the copy operator.
void operator =( const TestTest © );
private:
CPPUNIT_NS::TestSuite *m_suite;
MockTestCase *m_test1;
MockTestCase *m_test2;
CPPUNIT_NS::TestPath *m_path;
};
#endif // TESTTEST_H
|