TsUnitsOfMeasureManager Class Reference

Test suite for the Units of Measure Manager Class. More...

#include <TsUnitsOfMeasureManager.h>

Inheritance diagram for TsUnitsOfMeasureManager:

Public Member Functions

void setUp ()
 
void tearDown ()
 

Protected Member Functions

void tcConvert ()
 
void tcFindUomByAltName ()
 Test Case: Find an unit of using one of it's alternative name. More...
 
void tcFindUomByName ()
 Test Case: Find an unit of using it's identificaton number. void tcFindUomById ();. More...
 
void tcFindUomByNames ()
 Test Case: Find an unit of using either it's name or on e of it's alternative names. More...
 
void tcGeAltNames ()
 

Private Member Functions

 CPPUNIT_TEST (tcFindUomByName)
 
 CPPUNIT_TEST (tcFindUomByAltName)
 
 CPPUNIT_TEST (tcFindUomByNames)
 
 CPPUNIT_TEST (tcGeAltNames)
 
 CPPUNIT_TEST (tcConvert)
 
 CPPUNIT_TEST_SUITE (TsUnitsOfMeasureManager)
 
 CPPUNIT_TEST_SUITE_END ()
 

Private Attributes

std::vector< std::string > alternativeNames
 
te::common::UnitOfMeasurePtr uomA
 
te::common::UnitOfMeasurePtr uomB
 
te::common::UnitOfMeasurePtr uomC
 
te::common::UnitOfMeasurePtr uomD
 

Detailed Description

Test suite for the Units of Measure Manager Class.

This test suite will check the following:

  • Initializes the manager with data from a json file.
  • Inserting new unit of measure.
  • Inserting new unit of measure with alternative names.
  • Removing an unit of measure from the manager.
  • Finding an unit of measure identified by it's identificaton number.
  • Finding an unit of measure identified by it's name.
  • Finding an unit of measure identified by one of it's alternative names.
  • Finding an unit of measure identified either by it's name or one of it's alternative names.
  • Returning a pair of iterators over the managed units of measure.
  • Clearing all the managed units.
  • Returning the alternative names for a unit of measure.
  • Calculating a multiplicative factor to convert from a given unit to its base unit and vice-versa.

Definition at line 64 of file TsUnitsOfMeasureManager.h.

Member Function Documentation

TsUnitsOfMeasureManager::CPPUNIT_TEST ( tcFindUomByName  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST ( tcFindUomByAltName  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST ( tcFindUomByNames  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST ( tcGeAltNames  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST ( tcConvert  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST_SUITE ( TsUnitsOfMeasureManager  )
private
TsUnitsOfMeasureManager::CPPUNIT_TEST_SUITE_END ( )
private
void TsUnitsOfMeasureManager::tcConvert ( )
protected
void TsUnitsOfMeasureManager::tcFindUomByAltName ( )
protected

Test Case: Find an unit of using one of it's alternative name.

Definition at line 64 of file TsUnitsOfMeasureManager.cpp.

References te::common::Singleton< UnitsOfMeasureManager >::getInstance(), and uomD.

void TsUnitsOfMeasureManager::tcFindUomByName ( )
protected

Test Case: Find an unit of using it's identificaton number. void tcFindUomById ();.

Test Case: Find an unit of using it's name.

Definition at line 59 of file TsUnitsOfMeasureManager.cpp.

References te::common::Singleton< UnitsOfMeasureManager >::getInstance(), and uomC.

void TsUnitsOfMeasureManager::tcFindUomByNames ( )
protected

Test Case: Find an unit of using either it's name or on e of it's alternative names.

Definition at line 69 of file TsUnitsOfMeasureManager.cpp.

References te::common::Singleton< UnitsOfMeasureManager >::getInstance(), and uomD.

void TsUnitsOfMeasureManager::tcGeAltNames ( )
protected
void TsUnitsOfMeasureManager::tearDown ( )

Member Data Documentation

std::vector<std::string> TsUnitsOfMeasureManager::alternativeNames
private

Definition at line 118 of file TsUnitsOfMeasureManager.h.

Referenced by setUp(), and tcGeAltNames().

te::common::UnitOfMeasurePtr TsUnitsOfMeasureManager::uomA
private

Definition at line 113 of file TsUnitsOfMeasureManager.h.

Referenced by setUp().

te::common::UnitOfMeasurePtr TsUnitsOfMeasureManager::uomB
private

Definition at line 114 of file TsUnitsOfMeasureManager.h.

Referenced by setUp().

te::common::UnitOfMeasurePtr TsUnitsOfMeasureManager::uomC
private

Definition at line 115 of file TsUnitsOfMeasureManager.h.

Referenced by setUp(), and tcFindUomByName().

te::common::UnitOfMeasurePtr TsUnitsOfMeasureManager::uomD
private

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