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.
falk-werner_webfused/test/mock_config_builder.hpp

41 lines
1.3 KiB

#ifndef WFD_MOCK_CONFIG_BUILDER_HPP
#define WFD_MOCK_CONFIG_BUILDER_HPP
#include <gmock/gmock.h>
#include "webfused/config/builder.h"
namespace webfused_test
{
class IConfigBuilder
{
public:
virtual ~IConfigBuilder() = default;
virtual void setServerVhostname(char const * vhostname) = 0;
virtual void setServerPort(int port) = 0;
virtual void setServerKey(char const * key_path) = 0;
virtual void setServerCert(char const * cert_path) = 0;
virtual void setServerDocumentRoot(char const * document_root) = 0;
virtual bool addAuthProvider(char const * provider, wfd_settings * settings) = 0;
virtual bool addFilesystem(char const * name, char const * mountpoint) = 0;
};
class MockConfigBuilder: public IConfigBuilder
{
public:
~MockConfigBuilder() override = default;
MOCK_METHOD1(setServerVhostname, void (char const * vhostname));
MOCK_METHOD1(setServerPort, void (int port));
MOCK_METHOD1(setServerKey, void (char const * key_path));
MOCK_METHOD1(setServerCert, void (char const * cert_path));
MOCK_METHOD1(setServerDocumentRoot, void (char const * document_root));
MOCK_METHOD2(addAuthProvider, bool (char const * provider, wfd_settings * settings));
MOCK_METHOD2(addFilesystem, bool (char const * name, char const * mountpoint));
struct wfd_config_builder getBuilder();
};
}
#endif