TsDataSourceTransactor Class Reference

A test suit for the DataSourceTransactor interface. More...

#include <TsDataSourceTransactor.h>

Inheritance diagram for TsDataSourceTransactor:

Public Member Functions

void setUp ()
 
void tearDown ()
 

Protected Member Functions

void tcBegin ()
 Test Case: Testing DataSourceTransactor of an given datasource. More...
 
void tcCancel ()
 
void tcComit ()
 
void tcExecuteCommand ()
 
void tcExecuteQuery ()
 
void tcGetBatchExecutor ()
 
void tcGetCatalogLoader ()
 
void tcGetDataSet ()
 Test Case: get the dataSet using the i-th position in the DataSourceCatalog. More...
 
void tcGetDataSetByEnvRec ()
 Test Case: get only the objects that intercepts a given rectangle. More...
 
void tcGetDataSetByEnvRec1 ()
 
void tcGetDataSetByEnvRec2 ()
 Test Case: get only the objects that intercepts a given rectangle. More...
 
void tcGetDataSetByGeometry ()
 Test Case: get only the objects that intercepts a given geometry (point, box, pol, geom). More...
 
void tcGetDataSetByOids ()
 Test Case: It gets a dataset identified by the given name using the set of objects identification. More...
 
void tcGetDataSetByProperty ()
 Test Case: It gets the DataSet identified by the given name using a spatial filter over the given geometric property. More...
 
void tcGetDataSource ()
 
void tcGetPreparedStmt ()
 
void tcQueryBySelect ()
 
void tcQueryByString ()
 
void tcRenameDataSet ()
 
void tcRollback ()
 

Protected Attributes

te::gm::Envelope m_box
 
te::da::DataSourceCapabilities m_capabilit
 
std::map< std::string, std::string > m_connInfo
 
std::map< std::string, std::string > m_connInfoNewDs
 
te::da::DataSourcem_ds
 
te::da::DataSourceCatalogm_dsCatalog
 
std::string m_dsToString
 
std::string m_dsType
 
te::gm::Geometrym_geom
 
te::gm::LinearRingm_linearRing
 
size_t m_nroDataSets
 
te::gm::Polygonm_pol
 
te::gm::Point m_pt
 
std::vector< std::string > m_vecDtNames
 
std::vector< std::pair< std::string, te::gm::Envelope > > m_vecDtNamesAndEnvelops
 
std::vector< te::gm::Envelopem_vecEnvelops
 
std::vector< std::pair< std::string, te::gm::Envelope > > m_vecNamesAndRecs
 
std::vector< std::pair< std::string, size_t > > m_vecNamesSizes
 
std::vector< std::pair< std::string, size_t > > m_vecNamesSizesRec
 

Private Member Functions

 CPPUNIT_TEST (tcGetDataSource)
 
 CPPUNIT_TEST (tcRenameDataSet)
 
 CPPUNIT_TEST (tcGetDataSet)
 
 CPPUNIT_TEST (tcGetDataSetByGeometry)
 
 CPPUNIT_TEST (tcGetDataSetByProperty)
 
 CPPUNIT_TEST (tcGetDataSetByEnvRec)
 
 CPPUNIT_TEST (tcGetDataSetByEnvRec1)
 
 CPPUNIT_TEST (tcGetDataSetByEnvRec2)
 
 CPPUNIT_TEST (tcQueryByString)
 
 CPPUNIT_TEST_SUITE (TsDataSourceTransactor)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

A test suit for the DataSourceTransactor interface.

....
This test suite will check the following:

  • ;
  • ;
  • ;
  • ;
  • ;

Definition at line 55 of file TsDataSourceTransactor.h.

Member Function Documentation

TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSource  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcRenameDataSet  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSet  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSetByGeometry  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSetByProperty  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSetByEnvRec  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSetByEnvRec1  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcGetDataSetByEnvRec2  )
private
TsDataSourceTransactor::CPPUNIT_TEST ( tcQueryByString  )
private
TsDataSourceTransactor::CPPUNIT_TEST_SUITE ( TsDataSourceTransactor  )
private
TsDataSourceTransactor::CPPUNIT_TEST_SUITE_END ( )
private
void TsDataSourceTransactor::tcBegin ( )
protected

Test Case: Testing DataSourceTransactor of an given datasource.

Definition at line 66 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcCancel ( )
protected

Definition at line 430 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcComit ( )
protected

Definition at line 72 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcExecuteCommand ( )
protected

Definition at line 96 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcExecuteQuery ( )
protected

Definition at line 89 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcGetBatchExecutor ( )
protected

Definition at line 426 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcGetCatalogLoader ( )
protected
void TsDataSourceTransactor::tcGetDataSet ( )
protected

Test Case: get the dataSet using the i-th position in the DataSourceCatalog.

This test case will get all the dataSets using the i-th position in the DataSourceCatalog.

Definition at line 135 of file TsDataSourceTransactor.cpp.

References dt, te::da::DataSource::getTransactor(), te::da::DataSource::isOpened(), m_ds, and te::da::DataSource::open().

void TsDataSourceTransactor::tcGetDataSetByEnvRec ( )
protected

Test Case: get only the objects that intercepts a given rectangle.

This test case will get all the objects that intercepts a given rectangle defined m_vecNamesAndRecs. The vector of pairs contain the dataSets names and the rectangles to be used as a spatial filter when retrieving datasets.

Definition at line 269 of file TsDataSourceTransactor.cpp.

References te::dt::GEOMETRY_TYPE, te::da::DataSourceCapabilities::getDataTypeCapabilities(), te::da::GetFirstSpatialPropertyPos(), te::dt::Property::getName(), te::da::DataSource::getTransactor(), te::gm::INTERSECTS, te::da::DataSource::isOpened(), m_capabilit, m_ds, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, m_vecDtNames, and p.

void TsDataSourceTransactor::tcGetDataSetByEnvRec2 ( )
protected

Test Case: get only the objects that intercepts a given rectangle.

This test case will get all the objects that intercepts a given rectangle defined m_vecNamesAndRecs. The vector of pairs contain the dataSets names and the rectangles to be used as a spatial filter when retrieving datasets. The number of objects returned is compared with the size in the vector of pairs m_vecNamesSizesRec.

Definition at line 351 of file TsDataSourceTransactor.cpp.

References te::dt::GEOMETRY_TYPE, te::da::DataSourceCapabilities::getDataTypeCapabilities(), te::dt::Property::getName(), te::da::DataSource::getTransactor(), te::gm::INTERSECTS, te::da::DataSource::isOpened(), m_capabilit, m_ds, m_vecNamesAndRecs, m_vecNamesSizesRec, and p.

void TsDataSourceTransactor::tcGetDataSetByGeometry ( )
protected

Test Case: get only the objects that intercepts a given geometry (point, box, pol, geom).

This test case will get all the objects that intercepts a given geometry (point, box, pol, geom).

Definition at line 169 of file TsDataSourceTransactor.cpp.

References te::gm::Geometry::computeMBR(), dt, te::dt::GEOMETRY_TYPE, te::da::DataSourceCapabilities::getDataTypeCapabilities(), te::da::GetFirstSpatialPropertyPos(), te::dt::Property::getName(), te::da::DataSource::getTransactor(), te::gm::INTERSECTS, te::da::DataSource::isOpened(), m_box, m_capabilit, m_ds, m_geom, m_pol, m_pt, m_vecDtNames, and p.

void TsDataSourceTransactor::tcGetDataSetByOids ( )
protected

Test Case: It gets a dataset identified by the given name using the set of objects identification.

This test case will the gets the dataset identified by the given name using the set of objects identification.

Definition at line 391 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcGetDataSetByProperty ( )
protected

Test Case: It gets the DataSet identified by the given name using a spatial filter over the given geometric property.

This test case will gets the DataSet identified by the given name using a spatial filter over the given geometric property.

Definition at line 218 of file TsDataSourceTransactor.cpp.

References te::gm::Geometry::computeMBR(), dt, te::dt::GEOMETRY_TYPE, te::da::DataSourceCapabilities::getDataTypeCapabilities(), te::dt::Property::getName(), te::da::DataSource::getTransactor(), te::gm::INTERSECTS, te::da::DataSource::isOpened(), m_box, m_capabilit, m_ds, m_geom, m_pol, m_pt, m_vecDtNames, te::da::DataSource::open(), and p.

void TsDataSourceTransactor::tcGetDataSource ( )
protected
void TsDataSourceTransactor::tcGetPreparedStmt ( )
protected

Definition at line 422 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcQueryBySelect ( )
protected

Definition at line 418 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tcRenameDataSet ( )
protected
void TsDataSourceTransactor::tcRollback ( )
protected

Definition at line 78 of file TsDataSourceTransactor.cpp.

void TsDataSourceTransactor::tearDown ( )

Definition at line 59 of file TsDataSourceTransactor.cpp.

References m_ds, m_dsType, and m_pol.

Member Data Documentation

te::gm::Envelope TsDataSourceTransactor::m_box
protected

Definition at line 174 of file TsDataSourceTransactor.h.

Referenced by setUp(), tcGetDataSetByGeometry(), and tcGetDataSetByProperty().

std::map<std::string, std::string> TsDataSourceTransactor::m_connInfo
protected

Definition at line 157 of file TsDataSourceTransactor.h.

Referenced by setUp().

std::map<std::string, std::string> TsDataSourceTransactor::m_connInfoNewDs
protected

Definition at line 159 of file TsDataSourceTransactor.h.

te::da::DataSourceCatalog* TsDataSourceTransactor::m_dsCatalog
protected

Definition at line 161 of file TsDataSourceTransactor.h.

std::string TsDataSourceTransactor::m_dsToString
protected

Definition at line 163 of file TsDataSourceTransactor.h.

std::string TsDataSourceTransactor::m_dsType
protected

Definition at line 158 of file TsDataSourceTransactor.h.

Referenced by setUp(), and tearDown().

te::gm::Geometry* TsDataSourceTransactor::m_geom
protected

Definition at line 178 of file TsDataSourceTransactor.h.

Referenced by setUp(), tcGetDataSetByGeometry(), and tcGetDataSetByProperty().

te::gm::LinearRing* TsDataSourceTransactor::m_linearRing
protected

Definition at line 176 of file TsDataSourceTransactor.h.

size_t TsDataSourceTransactor::m_nroDataSets
protected

Definition at line 165 of file TsDataSourceTransactor.h.

Referenced by setUp().

te::gm::Polygon* TsDataSourceTransactor::m_pol
protected
te::gm::Point TsDataSourceTransactor::m_pt
protected

Definition at line 175 of file TsDataSourceTransactor.h.

Referenced by setUp(), tcGetDataSetByGeometry(), and tcGetDataSetByProperty().

std::vector<std::string> TsDataSourceTransactor::m_vecDtNames
protected
std::vector<std::pair<std::string, te::gm::Envelope> > TsDataSourceTransactor::m_vecDtNamesAndEnvelops
protected

Definition at line 169 of file TsDataSourceTransactor.h.

Referenced by setUp().

std::vector<te::gm::Envelope> TsDataSourceTransactor::m_vecEnvelops
protected

Definition at line 168 of file TsDataSourceTransactor.h.

Referenced by setUp().

std::vector<std::pair<std::string, te::gm::Envelope> > TsDataSourceTransactor::m_vecNamesAndRecs
protected

Definition at line 170 of file TsDataSourceTransactor.h.

Referenced by setUp(), tcGetDataSetByEnvRec1(), and tcGetDataSetByEnvRec2().

std::vector<std::pair<std::string, size_t> > TsDataSourceTransactor::m_vecNamesSizes
protected

Definition at line 171 of file TsDataSourceTransactor.h.

Referenced by setUp(), and tcQueryByString().

std::vector<std::pair<std::string, size_t> > TsDataSourceTransactor::m_vecNamesSizesRec
protected

Definition at line 172 of file TsDataSourceTransactor.h.

Referenced by setUp(), and tcGetDataSetByEnvRec2().


The documentation for this class was generated from the following files: