From: Maxim Mamontov Date: Thu, 26 May 2011 13:05:49 +0000 (+0300) Subject: Test TARIFFS implementation added X-Git-Tag: 2.408-alpha~140 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/9d0859536c6590903c7348250847ef608bcba14a?ds=sidebyside;hp=1dd4c748cdeb86cac49be8ff47eb4637e7145dbe Test TARIFFS implementation added --- diff --git a/tests/test_fee_charge_rules.cpp b/tests/test_fee_charge_rules.cpp index 93b7dd60..e233ae34 100644 --- a/tests/test_fee_charge_rules.cpp +++ b/tests/test_fee_charge_rules.cpp @@ -45,6 +45,26 @@ namespace tut unsigned feeChargeType; }; + class TEST_TARIFFS : public TARIFFS { + public: + TEST_TARIFFS() {} + + int ReadTariffs () { return 0; } + const TARIFF * FindByName(const std::string & name) const { return NULL; } + 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; } + + void GetTariffsData(std::list * tdl) {} + + const std::string & GetStrError() const { return strError; } + + private: + std::string strError; + }; + template<> template<> void testobject::test<1>() @@ -52,7 +72,8 @@ namespace tut set_test_name("Check classic rules"); TEST_SETTINGS settings(0); - USER_IMPL user(&settings, NULL, NULL, NULL, NULL); + TEST_TARIFFS tariffs; + USER_IMPL user(&settings, NULL, &tariffs, NULL, NULL); USER_PROPERTY & cash(user.GetProperty().cash);