21 #ifndef TESTUTILS_PROVIDERTESTHELPERS_H 22 #define TESTUTILS_PROVIDERTESTHELPERS_H 1 36 template <
typename Prov,
typename... Args>
41 template <
typename Prov>
45 template <
typename... Args>
47 {
return std::make_unique<Prov>(std::forward<Args>(
args)...); }
78 template <
typename Prov>
98 template <
typename Prov,
typename... Args>
153 template <
typename Prov,
typename TestEnv>
204 template <
typename Prov,
typename Interface,
typename TestEnv>
209 env.template SetupProviderFromServiceFor<Interface, Prov>(service_name);
213 template <
typename Prov,
typename TestEnv>
216 {
return env.template SetupProviderFromService<Prov>(service_name); }
232 template <
typename Prov,
typename TestEnv>
239 #endif // 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.