21 #ifndef LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 22 #define LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 1 37 template <
typename Prov,
typename... Args>
42 template <
typename Prov>
43 struct DefaultSetupProviderClass {
46 template <
typename... Args>
48 {
return std::make_unique<Prov>(std::forward<Args>(
args)...); }
79 template <
typename Prov>
99 template <
typename Prov,
typename... Args>
154 template <
typename Prov,
typename TestEnv>
205 template <
typename Prov,
typename Interface,
typename TestEnv>
210 env.template SetupProviderFromServiceFor<Interface, Prov>(service_name);
214 template <
typename Prov,
typename TestEnv>
217 {
return env.template SetupProviderFromService<Prov>(service_name); }
233 template <
typename Prov,
typename TestEnv>
240 #endif // LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H
std::function< std::unique_ptr< Prov >(Args...)> setupProvider_t
Generic setup provider function type.
static std::unique_ptr< Prov > setup(Args &&...args)
Instantiates a new provider with specified arguments for constructor.
Prov * simpleEnvironmentSetup(TestEnv &env)
Sets up a provider in a specified test environment.
Environment helper to set up a service provider.
A default implementation for provider setup class.
Class to create and set up a new provider.
std::unique_ptr< Prov > setupProvider(Args &&...args)
Function calling ProviderSetup<>::setup for the specified provider.
Prov * SimpleEnvironmentStandardSetupByName(TestEnv &env, std::string service_name)
Basic implementation of a environment setup helper.