From 9d0859536c6590903c7348250847ef608bcba14a Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 26 May 2011 16:05:49 +0300 Subject: [PATCH 1/1] Test TARIFFS implementation added --- tests/test_fee_charge_rules.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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); -- 2.44.2