RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
inMemoryOldb.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
14#define RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
15
16#include <tuple>
17
18#include <gmock/gmock.h>
19
20#include <ciiOldb.hpp>
21#include <ciiOldbGlobal.hpp>
22
24
32public:
33 MOCK_METHOD(void, ReadDataPoint, (const std::string& uri));
34 MOCK_METHOD(void, WriteDataPoint, (const std::string& uri));
35 MOCK_METHOD(void, DeleteDataPoint, (const std::string& uri));
36};
37
38using OldbCreationResult = std::tuple<std::shared_ptr<elt::oldb::CiiOldb>,
39 std::shared_ptr<MockExtRedisBackend>,
40 std::shared_ptr<MockExtRedisBackend>>;
41
72
85std::shared_ptr<elt::oldb::CiiOldb> CreateInMemoryOldb();
86
98 const std::string& target_config_storage = elt::oldb::CiiOldbGlobal::CONFIG_STORAGE_CACHE);
99
100} // namespace rtctk::componentFramework::test
101
102#endif // RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
Mock interface representing the external Redis backend.
Definition inMemoryOldb.hpp:31
MOCK_METHOD(void, ReadDataPoint,(const std::string &uri))
MOCK_METHOD(void, DeleteDataPoint,(const std::string &uri))
MOCK_METHOD(void, WriteDataPoint,(const std::string &uri))
Definition fakeClock.cpp:15
void DeleteAllConfigDataPoints(const std::string &target_config_storage=elt::oldb::CiiOldbGlobal::CONFIG_STORAGE_CACHE)
Deletes all configuration datapoints in the CII configuration service.
Definition inMemoryOldb.cpp:219
std::tuple< std::shared_ptr< elt::oldb::CiiOldb >, std::shared_ptr< MockExtRedisBackend >, std::shared_ptr< MockExtRedisBackend > > OldbCreationResult
Definition inMemoryOldb.hpp:38
OldbCreationResult CreateInMemoryOldbWithExtRedis()
This function prepares an in-memory OLDB with fake external Redis providers for unit testing.
Definition inMemoryOldb.cpp:155
std::shared_ptr< elt::oldb::CiiOldb > CreateInMemoryOldb()
This function prepares an in-memory OLDB that is suitable for unit testing.
Definition inMemoryOldb.cpp:191
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23