X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7dc3852ce6e3c2344e2de0815c1c79fc6b849bcf..a42349b9f8b4cbdcc6ad763ccf509f84fbaaf39d:/tests/testauth.h?ds=inline diff --git a/tests/testauth.h b/tests/testauth.h index 7085f927..f24d2eff 100644 --- a/tests/testauth.h +++ b/tests/testauth.h @@ -1,34 +1,32 @@ -#ifndef __TEST_AUTH_H__ -#define __TEST_AUTH_H__ +#pragma once #include "stg/auth.h" -class TEST_AUTH : public AUTH { +class TestAuth : public STG::Auth +{ public: - TEST_AUTH() {} + TestAuth() {} - void SetUsers(USERS * /*u*/) {} - void SetTariffs(TARIFFS * /*t*/) {} - void SetAdmins(ADMINS * /*a*/) {} - void SetTraffcounter(TRAFFCOUNTER * /*tc*/) {} - void SetStore(STORE * /*st*/) {} - void SetStgSettings(const SETTINGS * /*s*/) {} - void SetSettings(const MODULE_SETTINGS & /*s*/) {} - int ParseSettings() { return 0; } + void SetUsers(STG::Users* /*u*/) override {} + void SetTariffs(STG::Tariffs* /*t*/) override {} + void SetAdmins(STG::Admins* /*a*/) override {} + void SetTraffcounter(STG::TraffCounter* /*tc*/) override {} + void SetStore(STG::Store* /*st*/) override {} + void SetStgSettings(const STG::Settings* /*s*/) override {} + void SetSettings(const STG::ModuleSettings& /*s*/) override {} + int ParseSettings() override { return 0; } - int Start() { return 0; } - int Stop() { return 0; } - int Reload(const MODULE_SETTINGS&) { return 0; } - bool IsRunning() { return true; } - const std::string & GetStrError() const { return strError; } - std::string GetVersion() const { return ""; } - uint16_t GetStartPosition() const { return 0; } - uint16_t GetStopPosition() const { return 0; } + int Start() override { return 0; } + int Stop() override { return 0; } + int Reload(const STG::ModuleSettings&) override { return 0; } + bool IsRunning() override { return true; } + const std::string& GetStrError() const override { return m_errorStr; } + std::string GetVersion() const override { return ""; } + uint16_t GetStartPosition() const override { return 0; } + uint16_t GetStopPosition() const override { return 0; } - int SendMessage(const STG_MSG & /*msg*/, uint32_t /*ip*/) const { return 0; } + int SendMessage(const STG::Message& /*msg*/, uint32_t /*ip*/) const override { return 0; } private: - std::string strError; + std::string m_errorStr; }; - -#endif