23 lines
707 B
C++
23 lines
707 B
C++
#pragma once
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
#include <rublon/core_handler_interface.hpp>
|
|
|
|
namespace mocks {
|
|
|
|
class CoreHandlerMock : public rublon::CoreHandlerInterface< CoreHandlerMock > {
|
|
public:
|
|
|
|
tl::expected< rublon::Document, rublon::Error >
|
|
request(rublon::RapidJSONPMRAlloc &alloc, std::string_view path, const rublon::Document & req) const {
|
|
// const rublon::Document &doc = request(path, req).value();
|
|
// rublon::Document ret{&alloc};
|
|
// ret.CopyFrom(doc, alloc);
|
|
return request(path, req);
|
|
};
|
|
|
|
MOCK_METHOD(( tl::expected< rublon::Document, rublon::Error > ), request, ( std::string_view, const rublon::Document & ), (const));
|
|
};
|
|
} // namespace mocks
|