3 #include "stg/tariffs.h"
5 #include "tariff_impl.h"
7 class TestTariffs : public STG::Tariffs
10 TestTariffs() : m_tariff("") {}
12 int ReadTariffs() override { return 0; }
13 const STG::Tariff* FindByName(const std::string& /*name*/) const override { return &m_tariff; }
14 const STG::Tariff* GetNoTariff() const override { return NULL; }
15 int Del(const std::string& /*name*/, const STG::Admin* /*admin*/) override { return 0; }
16 int Add(const std::string& /*name*/, const STG::Admin* /*admin*/) override { return 0; }
17 int Chg(const STG::TariffData& /*td*/, const STG::Admin* /*admin*/) override { return 0; }
19 void AddNotifierAdd(STG::NotifierBase<STG::TariffData>*) override {}
20 void DelNotifierAdd(STG::NotifierBase<STG::TariffData>*) override {}
22 void AddNotifierDel(STG::NotifierBase<STG::TariffData>*) override {}
23 void DelNotifierDel(STG::NotifierBase<STG::TariffData>*) override {}
25 void GetTariffsData(std::vector<STG::TariffData>* /*tdl*/) const override {}
27 size_t Count() const override { return 0; }
29 const std::string& GetStrError() const override { return m_errorStr; }
31 void SetFee(double fee)
33 STG::TariffData td(m_tariff.GetTariffData());
34 td.tariffConf.fee = fee;
39 std::string m_errorStr;
40 STG::TariffImpl m_tariff;