1 #ifndef __TEST_TARIFFS_H__
2 #define __TEST_TARIFFS_H__
4 #include "stg/tariffs.h"
6 #include "tariff_impl.h"
8 class TEST_TARIFFS : public STG::Tariffs {
10 TEST_TARIFFS() : testTariff("") {}
12 int ReadTariffs() override { return 0; }
13 const STG::Tariff * FindByName(const std::string & /*name*/) const override { return &testTariff; }
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 strError; }
31 void SetFee(double fee);
35 STG::TariffImpl testTariff;
39 void TEST_TARIFFS::SetFee(double fee)
41 STG::TariffData td(testTariff.GetTariffData());
42 td.tariffConf.fee = fee;