1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/test/webfuse_provider/mocks/mock_provider.hpp
2020-06-16 23:57:41 +02:00

32 lines
988 B
C++

#ifndef WFP_MOCK_PROVIDER_HPP
#define WFP_MOCK_PROVIDER_HPP
#include "webfuse_provider/impl/provider.h"
#include <gmock/gmock.h>
namespace webfuse_test
{
class MockProvider
{
public:
MockProvider();
~MockProvider();
wfp_provider const * get_provider();
void * get_userdata();
MOCK_METHOD0(connected, void ());
MOCK_METHOD0(disconnected, void ());
MOCK_METHOD0(on_timer, void());
MOCK_METHOD3(lookup, void(wfp_request * request, ino_t parent, char const * name));
MOCK_METHOD2(getattr, void(wfp_request * request, ino_t inode));
MOCK_METHOD2(readdir, void(wfp_request * request, ino_t directory));
MOCK_METHOD3(open, void(wfp_request * request, ino_t inode, int flags));
MOCK_METHOD3(close, void(ino_t inode, uint32_t handle, int flags));
MOCK_METHOD5(read, void(wfp_request * request, ino_t inode, uint32_t handle, size_t offset, size_t length));
MOCK_METHOD1(get_credentials, void(wfp_credentials * credentials));
};
}
#endif