blob: 875ee515a87a069c6b8a73579bfd5e09441582bf (
plain)
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
68
69
70
71
72
73
74
75
76
77
|
#ifndef CPPUNITEST_XMLELEMENTTEST_H
#define CPPUNITEST_XMLELEMENTTEST_H
#include <cppunit/extensions/HelperMacros.h>
#include <stdexcept>
/*! Unit tests for XmlElement.
*/
class XmlElementTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( XmlElementTest );
CPPUNIT_TEST( testStringContentConstructor );
CPPUNIT_TEST( testNumericContentConstructor );
CPPUNIT_TEST( testSetName );
CPPUNIT_TEST( testSetStringContent );
CPPUNIT_TEST( testSetNumericContent );
CPPUNIT_TEST( testElementCount );
CPPUNIT_TEST_EXCEPTION( testElementAtNegativeIndexThrow, std::invalid_argument );
CPPUNIT_TEST_EXCEPTION( testElementAtTooLargeIndexThrow, std::invalid_argument );
CPPUNIT_TEST( testElementAt );
CPPUNIT_TEST_EXCEPTION( testElementForThrow, std::invalid_argument );
CPPUNIT_TEST( testElementFor );
CPPUNIT_TEST( testEmptyNodeToString );
CPPUNIT_TEST( testElementWithAttributesToString );
CPPUNIT_TEST( testEscapedAttributeValueToString );
CPPUNIT_TEST( testElementToStringEscapeContent );
CPPUNIT_TEST( testElementWithChildrenToString );
CPPUNIT_TEST( testElementWithContentToString );
CPPUNIT_TEST( testElementWithNumericContentToString );
CPPUNIT_TEST( testElementWithContentAndChildToString );
CPPUNIT_TEST_SUITE_END();
public:
/*! Constructs a XmlElementTest object.
*/
XmlElementTest();
/// Destructor.
virtual ~XmlElementTest();
void setUp();
void tearDown();
void testStringContentConstructor();
void testNumericContentConstructor();
void testSetName();
void testSetStringContent();
void testSetNumericContent();
void testElementCount();
void testElementAtNegativeIndexThrow();
void testElementAtTooLargeIndexThrow();
void testElementAt();
void testElementForThrow();
void testElementFor();
void testEmptyNodeToString();
void testElementWithAttributesToString();
void testEscapedAttributeValueToString();
void testElementToStringEscapeContent();
void testElementWithChildrenToString();
void testElementWithContentToString();
void testElementWithNumericContentToString();
void testElementWithContentAndChildToString();
private:
/// Prevents the use of the copy constructor.
XmlElementTest( const XmlElementTest © );
/// Prevents the use of the copy operator.
void operator =( const XmlElementTest © );
};
#endif // CPPUNITEST_XMLELEMENTTEST_H
|