TsDate.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 TsDate.h
22 
23  \brief Test suite for the Date class.
24  */
25 
26 #ifndef __TERRALIB_UNITTEST_DATATYPE_INTERNAL_DATE_H
27 #define __TERRALIB_UNITTEST_DATATYPE_INTERNAL_DATE_H
28 
29 // STL
30 #include <string>
31 #include <vector>
32 
33 // STL
34 #include <cstdio>
35 #include <cstdlib>
36 #include <cstring>
37 
38 //TerraLib
39 #include <terralib/datatype.h>
40 
41 // Boost
42 #include <boost/date_time/gregorian/gregorian.hpp>
43 
44 // cppUnit
45 #include <cppunit/extensions/HelperMacros.h>
46 
47 /*!
48  \class TsDate
49 
50  \brief Test suite for the Date, DateDuration and DatePeriod Classes.
51 
52  This test suite will check the following:
53  <ul>
54  <li> </li>
55  <li></li>
56  <li></li>
57  <li></li>
58  </ul>
59  */
60 class TsDate : public CPPUNIT_NS::TestFixture
61 {
62 // It registers this class as a Test Suit
64 
65 // It registers the class methods as Test Cases belonging to the suit
66 
74 
75 // Testing DateDuration Class
77 
78 // Testing DatePeriod Class
80 
81 
83 
84  public:
85 
86 // It sets up context before running the test.
87  void setUp();
88 
89 // It cleann up after the test run.
90  void tearDown();
91 
92  protected:
93 
94 // Test Cases:
95 
96  /*! \brief Test Case: It creates a date time with local date. The date and time are obtained from the system clock. */
97  void tcDate();
98 
99  /*! \brief Test Case: It checks date values (YY,MM,DD) */
100  void tcDateCheck();
101 
102  /*! \brief Test Case: Copy constructor. */
103  void tcDateConstructor();
104 
105  /*! \brief Test Case: Check TimeInstant. */
106  void tcDateTimeDuration();
107 
108  /*! \brief Test Case: Check operators (==, >,<, !=, -). */
109  void tcCheckOperators();
110 
111  /*! \brief Test Case: Clone this object and return AbstractData. */
112  void tcClone();
113 
114  /*! \brief It returns the date in the ISO textual format (YYYYMMDD). */
115  void tcToString();
116 
117  void tcDateDuration();
118 
119  void tcDatePeriod();
120 
121 };
122 
123 #endif // __TERRALIB_UNITTEST_DATATYPE_INTERNAL_DATE_H
124 
This file contains include headers for the Data Type module of TerraLib.
void tcClone()
Test Case: Clone this object and return AbstractData.
Definition: TsDate.cpp:167
void tcToString()
It returns the date in the ISO textual format (YYYYMMDD).
Definition: TsDate.cpp:178
void tcCheckOperators()
Test Case: Check operators (==, >,<, !=, -).
Definition: TsDate.cpp:141
CPPUNIT_TEST_SUITE_END()
void tcDateTimeDuration()
Test Case: Check TimeInstant.
Definition: TsDate.cpp:119
void tcDate()
Test Case: It creates a date time with local date. The date and time are obtained from the system clo...
Definition: TsDate.cpp:52
CPPUNIT_TEST_SUITE(TsDate)
CPPUNIT_TEST(tcDate)
void tcDateDuration()
Definition: TsDate.cpp:191
void tearDown()
Definition: TsDate.cpp:48
void tcDatePeriod()
Definition: TsDate.cpp:220
void setUp()
Definition: TsDate.cpp:44
Test suite for the Date, DateDuration and DatePeriod Classes.
Definition: TsDate.h:60
void tcDateConstructor()
Test Case: Copy constructor.
Definition: TsDate.cpp:107
void tcDateCheck()
Test Case: It checks date values (YY,MM,DD)
Definition: TsDate.cpp:69