From: Maxim Mamontov Date: Mon, 19 Sep 2011 20:11:24 +0000 (+0300) Subject: Fix tests for inclusive fee charge rules X-Git-Tag: 2.408-rc1~23 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/15cdce9cea7f6cdc188932ba889f055d9705d1f2?ds=sidebyside;hp=2ea67b39f9cade2b55cfbbd554af1049c1c69fd9 Fix tests for inclusive fee charge rules --- diff --git a/tests/test_fee_charge_rules.cpp b/tests/test_fee_charge_rules.cpp index 0b55e5de..dfe7e850 100644 --- a/tests/test_fee_charge_rules.cpp +++ b/tests/test_fee_charge_rules.cpp @@ -87,7 +87,7 @@ namespace tut user.ProcessDayFee(); ensure_equals("user.cash == 0", user.GetProperty().cash, 0); user.ProcessDayFee(); - ensure_equals("user.cash == 0", user.GetProperty().cash, 0); + ensure_equals("user.cash == 0", user.GetProperty().cash, -50); cash = 49; ensure_equals("user.cash == 49", user.GetProperty().cash, 49); user.ProcessDayFee(); @@ -119,10 +119,11 @@ namespace tut user.ProcessDayFee(); ensure_equals("user.cash == 50", user.GetProperty().cash, 50); user.ProcessDayFee(); - ensure_equals("user.cash == 50", user.GetProperty().cash, 50); - tariffs.SetFee(49); + ensure_equals("user.cash == 50", user.GetProperty().cash, 0); + cash = 50; + tariffs.SetFee(51); user.ProcessDayFee(); - ensure_equals("user.cash == 1", user.GetProperty().cash, 1); + ensure_equals("user.cash == 50", user.GetProperty().cash, 50); cash = 0; ensure_equals("user.cash == 0", user.GetProperty().cash, 0); user.ProcessDayFee();