TsTimeInstant.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 TsTimeInstant.h
22 
23  \brief Test suite for the TimeInstant class.
24  */
25 
26 #ifndef __TERRALIB_UNITTEST_DATATYPE_INTERNAL_TIMEINSTANT_H
27 #define __TERRALIB_UNITTEST_DATATYPE_INTERNAL_TIMEINSTANT_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 TsTimeInstant
49 
50  \brief Test suite for the TimeInstant Class.
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 TsTimeInstant : 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 
76 
78 
79  public:
80 
81 // It sets up context before running the test.
82  void setUp();
83 
84 // It cleann up after the test run.
85  void tearDown();
86 
87  protected:
88 
89 // Test Cases:
90 
91  /*! \brief Test Case: Empty Constructor. */
92  void tcTimeInstant();
93 
94  /*! \brief Test Case: Constructor from a date and time offset */
95  void tcTimeInstant2();
96 
97  /*! \brief Test Case: Constructor from a boost time instant type. */
98  void tcTimeInstant3();
99 
100  /*! \brief Test Case: It returns the boost time instant type. */
101  void tcGetTimeInstant();
102 
103  /*! \brief Test Case: It returns the date associated to time instant. */
104  void tcGetDate();
105 
106  /*! \brief Test Case:It returns the time duration associated to time instant. */
107  void tcGetTime();
108 
109  /*! \brief Test Case: Check operators (==, >,<, !=, -). */
110  void tcCheckOperators();
111 
112  /*! \brief Test Case: Clone this object and return AbstractData. */
113  void tcClone();
114 
115  /*! \brief It returns the time instant in the ISO textual format (YYYYMMDDTHHMMSS,fffffffff) where T is the date-time separator. */
116  void tcToString();
117 
118 };
119 
120 #endif // __TERRALIB_UNITTEST_DATATYPE_INTERNAL_TIMEINSTANT_H
This file contains include headers for the Data Type module of TerraLib.
CPPUNIT_TEST_SUITE(TsTimeInstant)
void tcTimeInstant()
Test Case: Empty Constructor.
void tcTimeInstant2()
Test Case: Constructor from a date and time offset.
void tcCheckOperators()
Test Case: Check operators (==, >,<, !=, -).
Test suite for the TimeInstant Class.
Definition: TsTimeInstant.h:60
CPPUNIT_TEST(tcTimeInstant)
void tcToString()
It returns the time instant in the ISO textual format (YYYYMMDDTHHMMSS,fffffffff) where T is the date...
void tcGetDate()
Test Case: It returns the date associated to time instant.
void tcTimeInstant3()
Test Case: Constructor from a boost time instant type.
void tcGetTime()
Test Case:It returns the time duration associated to time instant.
void tcGetTimeInstant()
Test Case: It returns the boost time instant type.
void tcClone()
Test Case: Clone this object and return AbstractData.