3 #include "stg/user_property.h"
6 #include "testsettings.h"
7 #include "testtariffs.h"
13 struct reconnect_on_tariff_change_data {
16 typedef test_group<reconnect_on_tariff_change_data> tg;
17 tg reconnect_on_tariff_change_test_group("Reconnect on tariff change tests group");
19 typedef tg::object testobject;
21 class TEST_SETTINGS_LOCAL : public TEST_SETTINGS {
23 TEST_SETTINGS_LOCAL(bool _reconnectOnTariffChange)
24 : reconnectOnTariffChange(_reconnectOnTariffChange)
27 bool GetReconnectOnTariffChange() const { return reconnectOnTariffChange; }
30 bool reconnectOnTariffChange;
35 void testobject::test<1>()
37 set_test_name("Check normal behaviour");
39 TEST_SETTINGS_LOCAL settings(false);
43 USER_IMPL user(&settings, &store, &tariffs, &admin, NULL);
45 USER_PROPERTY<std::string> & tariffName(user.GetProperty().tariffName);
47 ensure_equals("user.tariffName == NO_TARIFF_NAME", user.GetProperty().tariffName.ConstData(), NO_TARIFF_NAME);
49 ensure_equals("user.tariffName == 'test'", user.GetProperty().tariffName.ConstData(), "test");