TsTreeItem.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file TsTreeItem.h
22 
23  \brief Test suite for the TreeItem.
24  */
25 
26 #ifndef __TERRALIB_UNITTEST_COMMON_INTERNAL_TREEITEM_H
27 #define __TERRALIB_UNITTEST_COMMON_INTERNAL_TREEITEM_H
28 
29 // cppUnit
30 #include <cppunit/extensions/HelperMacros.h>
31 
32 // TerraLib
34 
35 /*!
36  \class TsTreeItem
37 
38  \brief Test suite for the TreeItem.
39  */
40 class TsTreeItem : public CPPUNIT_NS::TestFixture
41 {
42 // It registers this class as a Test Suit
44 
45 // It registers the class methods as Test Cases belonging to the suit
51  //CPPUNIT_TEST( childDisconnects ); // disconnect deletes all the structure!
55  //CPPUNIT_TEST( addingItems ); // adding and inserting fails when asserting (TreeItem, lines 83 and 91)
56  //CPPUNIT_TEST( removingItems ); // disconnect deletes all the structure!
57  //CPPUNIT_TEST( removingSequence ); // disconnect deletes all the structure!
60  //CPPUNIT_TEST( );
61 
63 
64  public:
65 
66 // It sets up context before running the test.
67  void setUp();
68 
69 // It cleann up after the test run.
70  void tearDown();
71 
72  protected:
73 
74 // Test Cases:
75  void noParent();
76  void parentChildConnection();
77  void simblings();
78  void checkNumberOfChildren();
80  void childDisconnects();
81  void iterateChildren();
82  void countItems();
83  void getChildByIndex();
84  void addingItems();
85  void removingItems();
86  void removingSequence();
87  void childSwap();
88  void siblingSwap();
89 };
90 
91 #endif // __TERRALIB_UNITTEST_COMMON_INTERNAL_TREEITEM_H
CPPUNIT_TEST_SUITE(TsTreeItem)
void getChildByIndex()
Definition: TsTreeItem.cpp:170
void removingItems()
Definition: TsTreeItem.cpp:208
A base class for data organized as a tree.
void childSwap()
Definition: TsTreeItem.cpp:231
void iterateChildren()
Definition: TsTreeItem.cpp:114
void countItems()
Definition: TsTreeItem.cpp:138
void setUp()
Definition: TsTreeItem.cpp:34
void parentChildConnection()
Definition: TsTreeItem.cpp:49
void tearDown()
Definition: TsTreeItem.cpp:38
CPPUNIT_TEST_SUITE_END()
void simblings()
Definition: TsTreeItem.cpp:57
void removingSequence()
Definition: TsTreeItem.cpp:216
void getChildAndCheckItsIndex()
Definition: TsTreeItem.cpp:83
void childDisconnects()
Definition: TsTreeItem.cpp:98
Test suite for the TreeItem.
Definition: TsTreeItem.h:40
void checkNumberOfChildren()
Definition: TsTreeItem.cpp:68
void noParent()
Definition: TsTreeItem.cpp:42
void siblingSwap()
Definition: TsTreeItem.cpp:251
void addingItems()
Definition: TsTreeItem.cpp:185
CPPUNIT_TEST(noParent)