20 #ifndef LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 21 #define LARCORE_TESTUTILS_PROVIDERTESTHELPERS_H 1 33 template <
typename Prov,
typename... Args>
37 template <
typename Prov>
41 template <
typename... Args>
42 static std::unique_ptr<Prov>
setup(Args&&... args)
44 return std::make_unique<Prov>(std::forward<Args>(args)...);
75 template <
typename Prov>
94 template <
typename Prov,
typename... Args>
150 template <
typename Prov,
typename TestEnv>
200 template <
typename Prov,
typename Interface,
typename TestEnv>
203 return env.template SetupProviderFromServiceFor<Interface, Prov>(service_name);
207 template <
typename Prov,
typename TestEnv>
210 return env.template SetupProviderFromService<Prov>(service_name);
226 template <
typename Prov,
typename TestEnv>
234 #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.