1
#ifndef CPPUNITEST_XMLELEMENTTEST_H
2
#define CPPUNITEST_XMLELEMENTTEST_H
4
#include <cppunit/extensions/HelperMacros.h>
8
/*! Unit tests for XmlElement.
10
class XmlElementTest : public CPPUNIT_NS::TestFixture
12
CPPUNIT_TEST_SUITE( XmlElementTest );
13
CPPUNIT_TEST( testStringContentConstructor );
14
CPPUNIT_TEST( testNumericContentConstructor );
15
CPPUNIT_TEST( testSetName );
16
CPPUNIT_TEST( testSetStringContent );
17
CPPUNIT_TEST( testSetNumericContent );
18
CPPUNIT_TEST( testElementCount );
19
CPPUNIT_TEST_EXCEPTION( testElementAtNegativeIndexThrow, std::invalid_argument );
20
CPPUNIT_TEST_EXCEPTION( testElementAtTooLargeIndexThrow, std::invalid_argument );
21
CPPUNIT_TEST( testElementAt );
22
CPPUNIT_TEST_EXCEPTION( testElementForThrow, std::invalid_argument );
23
CPPUNIT_TEST( testElementFor );
25
CPPUNIT_TEST( testEmptyNodeToString );
26
CPPUNIT_TEST( testElementWithAttributesToString );
27
CPPUNIT_TEST( testEscapedAttributeValueToString );
28
CPPUNIT_TEST( testElementToStringEscapeContent );
29
CPPUNIT_TEST( testElementWithChildrenToString );
30
CPPUNIT_TEST( testElementWithContentToString );
31
CPPUNIT_TEST( testElementWithNumericContentToString );
32
CPPUNIT_TEST( testElementWithContentAndChildToString );
33
CPPUNIT_TEST_SUITE_END();
36
/*! Constructs a XmlElementTest object.
41
virtual ~XmlElementTest();
46
void testStringContentConstructor();
47
void testNumericContentConstructor();
49
void testSetStringContent();
50
void testSetNumericContent();
51
void testElementCount();
52
void testElementAtNegativeIndexThrow();
53
void testElementAtTooLargeIndexThrow();
55
void testElementForThrow();
56
void testElementFor();
58
void testEmptyNodeToString();
59
void testElementWithAttributesToString();
60
void testEscapedAttributeValueToString();
61
void testElementToStringEscapeContent();
62
void testElementWithChildrenToString();
63
void testElementWithContentToString();
64
void testElementWithNumericContentToString();
65
void testElementWithContentAndChildToString();
68
/// Prevents the use of the copy constructor.
69
XmlElementTest( const XmlElementTest © );
71
/// Prevents the use of the copy operator.
72
void operator =( const XmlElementTest © );
77
#endif // CPPUNITEST_XMLELEMENTTEST_H