24 class RegistryHub :
public IRegistryHub,
public IMutableRegistryHub,
28 RegistryHub() =
default;
29 IReporterRegistry
const& getReporterRegistry()
const override {
30 return m_reporterRegistry;
32 ITestCaseRegistry
const& getTestCaseRegistry()
const override {
33 return m_testCaseRegistry;
35 IExceptionTranslatorRegistry
const& getExceptionTranslatorRegistry()
const override {
36 return m_exceptionTranslatorRegistry;
38 ITagAliasRegistry
const& getTagAliasRegistry()
const override {
39 return m_tagAliasRegistry;
41 StartupExceptionRegistry
const& getStartupExceptionRegistry()
const override {
42 return m_exceptionRegistry;
47 m_reporterRegistry.registerReporter(
name, factory );
50 m_reporterRegistry.registerListener( factory );
52 void registerTest( TestCase
const& testInfo )
override {
53 m_testCaseRegistry.registerTest( testInfo );
55 void registerTranslator(
const IExceptionTranslator* translator )
override {
56 m_exceptionTranslatorRegistry.registerTranslator( translator );
58 void registerTagAlias( std::string
const& alias, std::string
const& tag, SourceLineInfo
const& lineInfo )
override {
59 m_tagAliasRegistry.add( alias, tag, lineInfo );
61 void registerStartupException() noexcept
override {
62 m_exceptionRegistry.add(std::current_exception());
64 IMutableEnumValuesRegistry& getMutableEnumValuesRegistry()
override {
65 return m_enumValuesRegistry;
69 TestRegistry m_testCaseRegistry;
70 ReporterRegistry m_reporterRegistry;
71 ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;
72 TagAliasRegistry m_tagAliasRegistry;
73 StartupExceptionRegistry m_exceptionRegistry;
74 Detail::EnumValuesRegistry m_enumValuesRegistry;
static auto getMutable() -> MutableInterfaceT &
static auto get() -> InterfaceT const &
IMutableRegistryHub & getMutableRegistryHub()
IRegistryHub const & getRegistryHub()
std::shared_ptr< IReporterFactory > IReporterFactoryPtr
std::string translateActiveException()
virtual std::string translateActiveException() const =0
virtual IExceptionTranslatorRegistry const & getExceptionTranslatorRegistry() const =0