X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ce30e86822237a3523fd394943d50d010d70b701..611c8051a2ae58a1c306675c8250865e12563834:/tests/testtariffs.h?ds=sidebyside diff --git a/tests/testtariffs.h b/tests/testtariffs.h index e2651814..8d02d881 100644 --- a/tests/testtariffs.h +++ b/tests/testtariffs.h @@ -5,33 +5,40 @@ #include "tariff_impl.h" -class TEST_TARIFFS : public TARIFFS { +class TEST_TARIFFS : public STG::Tariffs { public: - TEST_TARIFFS() {} + TEST_TARIFFS() : testTariff("") {} - int ReadTariffs () { return 0; } - const TARIFF * FindByName(const std::string & /*name*/) const { return &testTariff; } - const TARIFF * GetNoTariff() const { return NULL; } - int GetTariffsNum() const { return 0; } - int Del(const std::string & /*name*/, const ADMIN * /*admin*/) { return 0; } - int Add(const std::string & /*name*/, const ADMIN * /*admin*/) { return 0; } - int Chg(const TARIFF_DATA & /*td*/, const ADMIN * /*admin*/) { return 0; } + int ReadTariffs() override { return 0; } + const STG::Tariff * FindByName(const std::string & /*name*/) const override { return &testTariff; } + const STG::Tariff * GetNoTariff() const override { return NULL; } + int Del(const std::string & /*name*/, const STG::Admin * /*admin*/) override { return 0; } + int Add(const std::string & /*name*/, const STG::Admin * /*admin*/) override { return 0; } + int Chg(const STG::TariffData & /*td*/, const STG::Admin * /*admin*/) override { return 0; } - void GetTariffsData(std::list * /*tdl*/) {} + void AddNotifierAdd(STG::NotifierBase *) override {} + void DelNotifierAdd(STG::NotifierBase *) override {} - const std::string & GetStrError() const { return strError; } + void AddNotifierDel(STG::NotifierBase *) override {} + void DelNotifierDel(STG::NotifierBase *) override {} + + void GetTariffsData(std::vector * /*tdl*/) const override {} + + size_t Count() const override { return 0; } + + const std::string & GetStrError() const override { return strError; } void SetFee(double fee); private: std::string strError; - TARIFF_IMPL testTariff; + STG::TariffImpl testTariff; }; inline void TEST_TARIFFS::SetFee(double fee) { - TARIFF_DATA td(testTariff.GetTariffData()); + STG::TariffData td(testTariff.GetTariffData()); td.tariffConf.fee = fee; testTariff = td; }