13#ifndef RTCTK_COMPONENTFRAMEWORK_TEST_MOCKREPOSITORYIF_HPP
14#define RTCTK_COMPONENTFRAMEWORK_TEST_MOCKREPOSITORYIF_HPP
30 .WillByDefault([
this](
const DataPointPath& path,
const std::type_info& type) {
37 .WillByDefault([
this](
const DataPointPath& path) ->
const std::type_info& {
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
A request object to pass information about datapoints that should be read from the repository.
Definition: repositoryIf.hpp:49
An object used to wait for a request to complete.
Definition: repositoryIf.hpp:197
A request object to pass information about datapoints that should be written to the repository.
Definition: repositoryIf.hpp:122
Abstract interface providing basic read and write facilities to a repository.
Definition: repositoryIf.hpp:38
virtual const std::type_info & GetDataPointType(const DataPointPath &path) const =0
Fetches the type of the datapoint.
virtual size_t GetDataPointSize(const DataPointPath &path) const =0
Fetches the size of the datapoint's data.
virtual std::pair< PathList, PathList > GetChildren(const DataPointPath &path) const =0
Queries the datapoints and child paths for a given path.
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type)=0
Creates a new datapoint in the repository with a specified type.
virtual void DeleteDataPoint(const DataPointPath &path)=0
Deletes a datapoint.
virtual bool DataPointExists(const DataPointPath &path) const =0
Checks for the existence of a datapoint in the repository.
virtual Response SendWriteRequest(const WriteRequest &request)=0
Sends a request to write data to the repository.
virtual Response SendReadRequest(const ReadRequest &request) const =0
Sends a request to read data from the repository.
Implementation of an in-memory fake repository for testing.
Definition: fakeRepositoryIf.hpp:31
Response SendReadRequest(const ReadRequest &) const override
Sends a request to read data from the repository.
Definition: fakeRepositoryIf.cpp:99
const std::type_info & GetDataPointType(const DataPointPath &) const override
Fetches the type of the datapoint.
Definition: fakeRepositoryIf.cpp:41
Response SendWriteRequest(const WriteRequest &) override
Sends a request to write data to the repository.
Definition: fakeRepositoryIf.cpp:103
std::size_t GetDataPointSize(const DataPointPath &) const override
Fetches the size of the datapoint's data.
Definition: fakeRepositoryIf.cpp:50
bool DataPointExists(const DataPointPath &) const override
Checks for the existence of a datapoint in the repository.
Definition: fakeRepositoryIf.cpp:60
void DeleteDataPoint(const DataPointPath &) override
Deletes a datapoint.
Definition: fakeRepositoryIf.cpp:28
void CreateDataPoint(const DataPointPath &, const std::type_info &) override
Creates a new datapoint in the repository with a specified type.
Definition: fakeRepositoryIf.cpp:19
std::pair< PathList, PathList > GetChildren(const DataPointPath &) const override
Queries the datapoints and child paths for a given path.
Definition: fakeRepositoryIf.cpp:66
A mock of RepositoryIf.
Definition: mockRepositoryIf.hpp:25
MOCK_METHOD(void, DeleteDataPoint,(const DataPointPath &),(override))
MockRepositoryIf()
Definition: mockRepositoryIf.hpp:27
MOCK_METHOD(Response, SendReadRequest,(const ReadRequest &),(const override))
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type)=0
Creates a new datapoint in the repository with a specified type.
MOCK_METHOD((std::pair< PathList, PathList >), GetChildren,(const DataPointPath &),(const override))
MOCK_METHOD(Response, SendWriteRequest,(const WriteRequest &),(override))
MOCK_METHOD(void, CreateDataPoint,(const DataPointPath &, const std::type_info &),(override))
MOCK_METHOD(bool, DataPointExists,(const DataPointPath &),(const override))
MOCK_METHOD(const std::type_info &, GetDataPointType,(const DataPointPath &),(const override))
MOCK_METHOD(std::size_t, GetDataPointSize,(const DataPointPath &),(const override))
Header file for an in-memory fake RepositoryIf.
Definition: fakeClock.cpp:15