RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
inMemoryOldb.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
13#define RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
14
15#include <tuple>
16
17#include <gmock/gmock.h>
18
19#include <ciiOldb.hpp>
20#include <ciiOldbGlobal.hpp>
21
23
31public:
32 MOCK_METHOD(void, ReadDataPoint, (const std::string& uri));
33 MOCK_METHOD(void, WriteDataPoint, (const std::string& uri));
34 MOCK_METHOD(void, DeleteDataPoint, (const std::string& uri));
35};
36
37using OldbCreationResult = std::tuple<std::shared_ptr<elt::oldb::CiiOldb>,
38 std::shared_ptr<MockExtRedisBackend>,
39 std::shared_ptr<MockExtRedisBackend>>;
40
66
74std::shared_ptr<elt::oldb::CiiOldb> CreateInMemoryOldb();
75
87 const std::string& target_config_storage = elt::oldb::CiiOldbGlobal::CONFIG_STORAGE_CACHE);
88
89} // namespace rtctk::componentFramework::test
90
91#endif // RTCTK_COMPONENTFRAMEWORK_TEST_INMEMORYOLDB_HPP
Mock interface representing the external Redis backend.
Definition inMemoryOldb.hpp:30
MOCK_METHOD(void, ReadDataPoint,(const std::string &uri))
MOCK_METHOD(void, DeleteDataPoint,(const std::string &uri))
MOCK_METHOD(void, WriteDataPoint,(const std::string &uri))
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:117
OldbCreationResult CreateInMemoryOldbWithExtRedis()
This function prepares an in-memory OLDB with fake external Redis providers for unit testing.
Definition inMemoryOldb.cpp:80
std::shared_ptr< elt::oldb::CiiOldb > CreateInMemoryOldb()
This function prepares an in-memory OLDB that is suitable for unit testing.
Definition inMemoryOldb.cpp:113
Definition fakeClock.cpp:14
std::tuple< std::shared_ptr< elt::oldb::CiiOldb >, std::shared_ptr< MockExtRedisBackend >, std::shared_ptr< MockExtRedisBackend > > OldbCreationResult
Definition inMemoryOldb.hpp:37