SmartTester  2.0.0
Smart Tester is unit testing and regression testing framework used for testing SmartCGMS system.
Public Member Functions | Protected Member Functions | List of all members
tester::EntityUnitTester< T > Class Template Referenceabstract

#include <GenericUnitTester.h>

Inheritance diagram for tester::EntityUnitTester< T >:
Inheritance graph
[legend]
Collaboration diagram for tester::EntityUnitTester< T >:
Collaboration graph
[legend]

Public Member Functions

 EntityUnitTester (const GUID &entityGuid)
 
virtual void executeAllTests ()=0
 Every derived class has to override this method to execute all tests.
 
bool isEntityLoaded () const noexcept
 
CDynamic_Library & getEntityLib () noexcept
 
const GUID & getEntityGuid () const noexcept
 
void loadEntityLibrary ()
 
virtual void loadEntity ()=0
 Loads tested entity. Has to be implemented by derived classes.
 
template<typename C , typename D >
const wchar_t * getEntityName (const std::string &symbolName)
 
- Public Member Functions inherited from tester::TestRunner
void executeTest (const std::wstring &testName, const std::function< HRESULT(void)> &test)
 

Protected Member Functions

void setEntityLib (const std::wstring &libPath)
 
void setLibraryPath (const std::wstring &libraryPath) noexcept
 
const std::wstring & getLibraryPath () const
 
T * getTestedEntity () noexcept
 
void setTestedEntity (T *entity)
 
void runTest (const std::function< HRESULT()> &test) override
 We need special behavior of the test execution sequence, so we override this method. More...
 
- Protected Member Functions inherited from tester::TestRunner
virtual HRESULT shutDownTest ()=0
 Every derived class has to override the test shutdown mechanism.
 

Additional Inherited Members

- Protected Attributes inherited from tester::TestRunner
std::mutex m_testMutex
 
std::condition_variable m_testCv
 
HRESULT m_lastTestResult = S_OK
 

Detailed Description

template<typename T>
class tester::EntityUnitTester< T >

Generic class containing information about any tested entity.

Template Parameters
TType of the entity we are testing

Member Function Documentation

◆ getEntityGuid()

template<typename T >
const GUID& tester::EntityUnitTester< T >::getEntityGuid ( ) const
inlinenoexcept

Returns the entity GUID.

Returns
entity GUID

◆ getEntityLib()

template<typename T >
CDynamic_Library& tester::EntityUnitTester< T >::getEntityLib ( )
inlinenoexcept

Returns the wrapper of the entity library.

Returns
entity library wrapper

◆ isEntityLoaded()

template<typename T >
bool tester::EntityUnitTester< T >::isEntityLoaded ( ) const
inlinenoexcept

Checks whether the entity is loaded or not.

Returns
true if the entity is loaded, otherwise false

◆ loadEntityLibrary()

template<typename T >
void tester::EntityUnitTester< T >::loadEntityLibrary ( )
inline

Loads library of tested entity.

◆ runTest()

template<typename T >
void tester::EntityUnitTester< T >::runTest ( const std::function< HRESULT()> &  test)
inlineoverrideprotected

We need special behavior of the test execution sequence, so we override this method.

Need to check, because filter will be unloaded in case of TIMEOUT


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