rublon-ssh/PAM/ssh/tests/core_handler_mock.hpp
rublon-bwi 6b9d2f938c
Bwi/v2.1.0 (#15)
* Add phone call authentication method

* Remove dynamic mem allocation from error handler

* Add more error handling code

* Move error handling to different file

* Remove Socket IO dependency

* cleanup in websocket code

* Add rapidjson as cmake dependency

* Added Dockerfiles as primary build system for packages

* Changed policy in CMakeList to work with lower version of CMake

* Fix opensuse builds

* Link filesystem library in gcc 8.5 or older
2024-11-18 12:57:20 +01:00

22 lines
721 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 &, 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