MySQL 9.0.0
Source Code Documentation
TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance > Class Template Reference

Implements a Gmock Test suite class to test a component. More...

#include <test_harness_suite.h>

Inheritance diagram for TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >:
[legend]

Protected Member Functions

bool component_load (char const *component_to_load, char const *svc_to_load)
 
void component_unload ()
 
 TestHarnessSuite_templ ()
 
 ~TestHarnessSuite_templ () override
 
void SetUp () override
 
void TearDown () override
 

Protected Attributes

mysql_registry_tm_reg
 
my_service< mysql_dyloader_t > * m_dl
 Reference to the registry. More...
 
my_service< test_service_t > * m_test_svc
 reference to the dynamic loader More...
 
std::string m_urn
 reference to the test service More...
 

Private Types

using mysql_dyloader_t = const mysql_service_dynamic_loader_t
 
using mysql_registry_t = mysql_service_registry_t
 

Detailed Description

template<typename test_service_t, char const * component_name, char const * service_name, mysql_component_t * component_instance>
class TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >

Implements a Gmock Test suite class to test a component.

Load the component under test and fetches a reference to it.

It can also load an optional local test harness component, should the component under test require extra services the minimal chassis doesn't provide. Usually the harness is test oriented and mocks the services so that the test can run.

Template Parameters
test_service_tThe service type of the service to test
component_nameThe name of the component to load, or nullptr to avoid loading extra components
service_nameThe name of the service to instantiate, or nullptr to avoid fetching service refs
component_instanceThe instance of the test harness component to load with the minchassis, or nullptr if none
See also
Component unit testing using the minimal chasiss.

Member Typedef Documentation

◆ mysql_dyloader_t

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
using TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::mysql_dyloader_t = const mysql_service_dynamic_loader_t
private

◆ mysql_registry_t

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
using TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::mysql_registry_t = mysql_service_registry_t
private

Constructor & Destructor Documentation

◆ TestHarnessSuite_templ()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::TestHarnessSuite_templ ( )
inlineprotected

◆ ~TestHarnessSuite_templ()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::~TestHarnessSuite_templ ( )
inlineoverrideprotected

Member Function Documentation

◆ component_load()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
bool TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::component_load ( char const *  component_to_load,
char const *  svc_to_load 
)
inlineprotected

◆ component_unload()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
void TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::component_unload ( )
inlineprotected

◆ SetUp()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
void TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::SetUp ( )
inlineoverrideprotected

◆ TearDown()

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
void TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::TearDown ( )
inlineoverrideprotected

Member Data Documentation

◆ m_dl

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
my_service<mysql_dyloader_t>* TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::m_dl
protected

Reference to the registry.

◆ m_reg

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
mysql_registry_t* TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::m_reg
protected

◆ m_test_svc

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
my_service<test_service_t>* TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::m_test_svc
protected

reference to the dynamic loader

◆ m_urn

template<typename test_service_t , char const * component_name, char const * service_name, mysql_component_t * component_instance>
std::string TestHarnessSuite_templ< test_service_t, component_name, service_name, component_instance >::m_urn
protected

reference to the test service


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