You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
831 B
35 lines
831 B
6 years ago
|
#ifndef MOCK_AUTHENTICATOR_H
|
||
|
#define MOCK_AUTHENTICATOR_H
|
||
|
|
||
|
#include <gmock/gmock.h>
|
||
6 years ago
|
#include "webfuse/adapter/impl/authenticator.h"
|
||
6 years ago
|
|
||
6 years ago
|
namespace webfuse_test
|
||
6 years ago
|
{
|
||
|
|
||
|
class Authenticator
|
||
|
{
|
||
|
public:
|
||
|
virtual ~Authenticator() { }
|
||
|
virtual bool authenticate(
|
||
6 years ago
|
struct wf_credentials * credentials,
|
||
6 years ago
|
void * user_data) = 0;
|
||
|
};
|
||
|
|
||
|
class MockAuthenticator: public Authenticator
|
||
|
{
|
||
|
public:
|
||
6 years ago
|
MOCK_METHOD2(authenticate, bool (struct wf_credentials * credentials, void * user_data));
|
||
6 years ago
|
};
|
||
|
|
||
|
void set_authenticator(Authenticator * authenticator);
|
||
|
void set_authenticator(size_t index, Authenticator * authenticator);
|
||
|
|
||
6 years ago
|
bool authenticate(struct wf_credentials * creds, void * user_data);
|
||
|
bool authenticate_1(struct wf_credentials * creds, void * user_data);
|
||
|
bool authenticate_2(struct wf_credentials * creds, void * user_data);
|
||
6 years ago
|
|
||
|
}
|
||
|
|
||
|
#endif
|