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