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 GetTariffsData(std::vector<STG::TariffData>* /*tdl*/) const override {}
21 size_t Count() const override { return 0; }
23 const std::string& GetStrError() const override { return m_errorStr; }
25 void SetFee(double fee)
27 STG::TariffData td(m_tariff.GetTariffData());
28 td.tariffConf.fee = fee;
33 std::string m_errorStr;
34 STG::TariffImpl m_tariff;