21 #ifndef LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 22 #define LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 1 37 template <
typename Prov,
typename... Args>
42 template <
typename Prov>
46 template <
typename... Args>
47 static std::unique_ptr<Prov>
setup(Args&&... 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>
207 (TestEnv& env, std::string service_name)
210 env.template SetupProviderFromServiceFor<Interface, Prov>(service_name);
214 template <
typename Prov,
typename TestEnv>
216 (TestEnv& env, std::string service_name)
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 ProviderSetupClass<>::setup for the specified provider.
Prov * SimpleEnvironmentStandardSetupByName(TestEnv &env, std::string service_name)
Basic implementation of a environment setup helper.