2020-03-18 09:17:17 +00:00
|
|
|
#ifndef WFD_MOCK_AUTH_SETTINGS_HPP
|
|
|
|
#define WFD_MOCK_AUTH_SETTINGS_HPP
|
|
|
|
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
#include "webfused/config/settings.h"
|
|
|
|
|
|
|
|
namespace webfused_test
|
|
|
|
{
|
|
|
|
|
|
|
|
class ISettings
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~ISettings() = default;
|
2020-03-20 13:16:32 +00:00
|
|
|
virtual char const * wfd_settings_get_string(wfd_settings * settings, char const * key) = 0;
|
|
|
|
virtual char const * wfd_settings_get_string_or_default(wfd_settings * settings, char const * key, char const * default_value) = 0;
|
|
|
|
virtual bool wfd_settings_get_bool(wfd_settings * settings, char const * key) = 0;
|
2020-03-18 09:17:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class MockSettings: public ISettings
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MockSettings();
|
|
|
|
~MockSettings() override;
|
2020-03-20 13:16:32 +00:00
|
|
|
MOCK_METHOD2(wfd_settings_get_string, char const * (wfd_settings * settings, char const * key));
|
|
|
|
MOCK_METHOD3(wfd_settings_get_string_or_default, char const * (wfd_settings * settings, char const * key, char const * default_value));
|
|
|
|
MOCK_METHOD2(wfd_settings_get_bool, bool (wfd_settings * settings, char const * key));
|
2020-03-18 09:17:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|