1 #ifndef XMLUNIFORMISERTEST_H 2 #define XMLUNIFORMISERTEST_H 3 4 #include <cppunit/extensions/HelperMacros.h> 5 6 7 /*! \class XmlUniformiserTest 8 * \brief Unit test for XmlUniformiser. 9 */ 10 class XmlUniformiserTest : public CPPUNIT_NS::TestFixture 11 { 12 CPPUNIT_TEST_SUITE( XmlUniformiserTest ); 13 CPPUNIT_TEST( testEmpty ); 14 CPPUNIT_TEST( testSkipProcessed ); 15 CPPUNIT_TEST( testOpenElementWithoutAttributeButSomeSpaces ); 16 CPPUNIT_TEST( testOpenCloseElement ); 17 CPPUNIT_TEST( testElementWithEmptyAttribute ); 18 CPPUNIT_TEST( testElementWithEmptyAttributeButSomeSpaces ); 19 CPPUNIT_TEST( testElementWithOneAttribute ); 20 CPPUNIT_TEST( testElementWithThreeAttributes ); 21 CPPUNIT_TEST( testSkipComment ); 22 CPPUNIT_TEST( testElementWithContent ); 23 CPPUNIT_TEST( testElementsHierarchyWithContents ); 24 CPPUNIT_TEST( testAssertXmlEqual ); 25 CPPUNIT_TEST_SUITE_END(); 26 27 public: 28 /*! Constructs a XmlUniformiserTest object. 29 */ 30 XmlUniformiserTest(); 31 32 /// Destructor. 33 virtual ~XmlUniformiserTest(); 34 35 void setUp(); 36 void tearDown(); 37 38 void testEmpty(); 39 void testSkipProcessed(); 40 void testOpenElementWithoutAttributeButSomeSpaces(); 41 void testOpenCloseElement(); 42 void testElementWithEmptyAttribute(); 43 void testElementWithEmptyAttributeButSomeSpaces(); 44 void testElementWithOneAttribute(); 45 void testElementWithThreeAttributes(); 46 void testSkipComment(); 47 void testElementWithContent(); 48 void testElementsHierarchyWithContents(); 49 50 void testAssertXmlEqual(); 51 52 private: 53 void check( const std::string &xml, 54 const std::string &expectedStrippedXml ); 55 56 /// Prevents the use of the copy constructor. 57 XmlUniformiserTest( const XmlUniformiserTest © ); 58 59 /// Prevents the use of the copy operator. 60 void operator =( const XmlUniformiserTest © ); 61 62 private: 63 }; 64 65 66 67 #endif // XMLUNIFORMISERTEST_H 68