Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
DependencyFactory_test Class Reference

Description

Test:
verify the various modes of creating dependencies.
  • standard case is singleton creation
  • configuration of a specific subclass for the singleton
  • use of a custom factory function
  • injection of a mock implementation for unit tests
See also
lib::Dependency
Singleton_test
DependencyConfiguration_test newer test from 2018 to cover the same ground

Definition at line 91 of file dependency-factory-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void verify_defaultSingletonCreation ()
 
void verify_SubclassCreation ()
 
void verify_FactoryDefinition_is_sticky ()
 
void verify_customFactory ()
 
void verify_automaticReplacement ()
 

Static Private Member Functions

static SubSubDub * customFactoryFunction (void)
 

Member Function Documentation

◆ run()

virtual void run ( Arg  )
inlineprivatevirtual

Definition at line 96 of file dependency-factory-test.cpp.

References DependencyFactory_test::verify_automaticReplacement(), DependencyFactory_test::verify_customFactory(), DependencyFactory_test::verify_defaultSingletonCreation(), DependencyFactory_test::verify_FactoryDefinition_is_sticky(), and DependencyFactory_test::verify_SubclassCreation().

+ Here is the call graph for this function:

◆ verify_defaultSingletonCreation()

void verify_defaultSingletonCreation ( )
inlineprivate

Definition at line 108 of file dependency-factory-test.cpp.

Referenced by DependencyFactory_test::run().

+ Here is the caller graph for this function:

◆ verify_SubclassCreation()

void verify_SubclassCreation ( )
inlineprivate

Definition at line 120 of file dependency-factory-test.cpp.

References INSTANCEOF.

Referenced by DependencyFactory_test::run().

+ Here is the caller graph for this function:

◆ verify_FactoryDefinition_is_sticky()

void verify_FactoryDefinition_is_sticky ( )
inlineprivate

Definition at line 138 of file dependency-factory-test.cpp.

References INSTANCEOF.

Referenced by DependencyFactory_test::run().

+ Here is the caller graph for this function:

◆ verify_customFactory()

void verify_customFactory ( )
inlineprivate

Definition at line 156 of file dependency-factory-test.cpp.

References DependencyFactory_test::customFactoryFunction(), INSTANCEOF, and DependInject< SRV >::useSingleton().

Referenced by DependencyFactory_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ customFactoryFunction()

static SubSubDub * customFactoryFunction ( void  )
inlinestaticprivate

Definition at line 167 of file dependency-factory-test.cpp.

Referenced by DependencyFactory_test::verify_customFactory().

+ Here is the caller graph for this function:

◆ verify_automaticReplacement()

void verify_automaticReplacement ( )
inlineprivate

Definition at line 177 of file dependency-factory-test.cpp.

References INSTANCEOF.

Referenced by DependencyFactory_test::run().

+ Here is the caller graph for this function:
+ Inheritance diagram for DependencyFactory_test:
+ Collaboration diagram for DependencyFactory_test:

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