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/mock_authenticator.hpp
Falk Werner 1c9d1c8420
feat(API wrapper): separates implementation from public API
* moves implementation to impl subdirectory
* adds prefix _impl to implementation symbols
* removes double compilation for shared and static libraries
* fixes include guards
* fixes usage of extern "C"
2019-03-26 15:35:33 +01:00

35 lines
835 B
C++

#ifndef MOCK_AUTHENTICATOR_H
#define MOCK_AUTHENTICATOR_H
#include <gmock/gmock.h>
#include "wsfs/adapter/impl/authenticator.h"
namespace wsfs_test
{
class Authenticator
{
public:
virtual ~Authenticator() { }
virtual bool authenticate(
struct wsfs_credentials * credentials,
void * user_data) = 0;
};
class MockAuthenticator: public Authenticator
{
public:
MOCK_METHOD2(authenticate, bool (struct wsfs_credentials * credentials, void * user_data));
};
void set_authenticator(Authenticator * authenticator);
void set_authenticator(size_t index, Authenticator * authenticator);
bool authenticate(struct wsfs_credentials * creds, void * user_data);
bool authenticate_1(struct wsfs_credentials * creds, void * user_data);
bool authenticate_2(struct wsfs_credentials * creds, void * user_data);
}
#endif