template<
typename T>
class rtctk::componentFramework::test::RepositoryIfTestSuiteLegacy< T >
A test suite for performing acceptance tests of a RepositoryIf implementation.
Any adapter classes that derive from RepositoryIf can instantiate these parameterised tests to check compliance of the new adapter. To instantiate the test suite one should use the INSTANTIATE_TYPED_TEST_SUITE_P macro as described in the Google Test documentation. The setup and teardown methods will call templated functions for CreateRepository and CleanupRepository. These should be specialised and provided by the user of this test suite for each repository adapter type that will be tested. The purpose of these template functions is to create and then cleanup an instance of the repository adapter for a given type. If calling the default destructor is sufficient for correctly tearing down the adapter of a given type, then there is no need to provide a custom CleanupRepository, since this is done by default.
The following is sample code showing how to instantiate this test suite for an example adapter called MyAdapter in a unit test source file:
template <> template <>
...
}
template <> template <>
std::shared_ptr<MyAdapter>& adapter) {
...
}
INSTANTIATE_TYPED_TEST_SUITE_P(TestMyAdapter,
RepositoryIfTestSuiteLegacy,
AdapterTypes,
testing::internal::DefaultNameGenerator);
}
A test suite for performing acceptance tests of a RepositoryIf implementation.
Definition repositoryIfTestSuiteLegacy.hpp:80
Definition fakeClock.cpp:15
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Header file declaring type parameterised tests for RepositoryIf.
Note that only the CreateRepository, CleanupRepository and INSTANTIATE_TYPED_TEST_SUITE_P definitions should be contained within the rtctk::componentFramework::test namespace when instantiating the test suite. This is to avoid that Doxygen inappropriately adds any other definitions to the API documentation for the namespace.