SmartTester
2.0.0
Smart Tester is unit testing and regression testing framework used for testing SmartCGMS system.
|
#include <GenericUnitTester.h>
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) |
![]() | |
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... | |
![]() | |
virtual HRESULT | shutDownTest ()=0 |
Every derived class has to override the test shutdown mechanism. | |
Additional Inherited Members | |
![]() | |
std::mutex | m_testMutex |
std::condition_variable | m_testCv |
HRESULT | m_lastTestResult = S_OK |
Generic class containing information about any tested entity.
T | Type of the entity we are testing |
|
inlinenoexcept |
Returns the entity GUID.
|
inlinenoexcept |
Returns the wrapper of the entity library.
|
inlinenoexcept |
Checks whether the entity is loaded or not.
|
inline |
Loads library of tested entity.
|
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