TestServices services;
STG::UserImpl user(&settings, &store, &tariffs, &admin, &users, services);
TestServices services;
STG::UserImpl user(&settings, &store, &tariffs, &admin, &users, services);
STG::UserProperty<std::string> & tariffName = user.GetProperties().tariffName;
STG::UserProperty<STG::UserIPs> & ips = user.GetProperties().ips;
STG::UserProperty<std::string> & tariffName = user.GetProperties().tariffName;
STG::UserProperty<STG::UserIPs> & ips = user.GetProperties().ips;
ips = STG::UserIPs::parse("*");
BOOST_CHECK_EQUAL(user.GetConnected(), false);
ips = STG::UserIPs::parse("*");
BOOST_CHECK_EQUAL(user.GetConnected(), false);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(0));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(0));
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(1));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(1));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(0));
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(1));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(1));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(0));
TestServices services;
STG::UserImpl user(&settings, &store, &tariffs, &admin, &users, services);
TestServices services;
STG::UserImpl user(&settings, &store, &tariffs, &admin, &users, services);
STG::UserProperty<std::string> & tariffName = user.GetProperties().tariffName;
STG::UserProperty<STG::UserIPs> & ips = user.GetProperties().ips;
STG::UserProperty<std::string> & tariffName = user.GetProperties().tariffName;
STG::UserProperty<STG::UserIPs> & ips = user.GetProperties().ips;
ips = STG::UserIPs::parse("*");
BOOST_CHECK_EQUAL(user.GetConnected(), false);
ips = STG::UserIPs::parse("*");
BOOST_CHECK_EQUAL(user.GetConnected(), false);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(0));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(0));
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(1));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(0));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(1));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(0));
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
BOOST_CHECK_EQUAL(user.IsAuthorizedBy(&auth), true);
BOOST_CHECK_EQUAL(user.GetConnected(), true);
- BOOST_CHECK_EQUAL(connectionNotifier.connects(), static_cast<size_t>(2));
- BOOST_CHECK_EQUAL(connectionNotifier.disconnects(), static_cast<size_t>(1));
+ BOOST_CHECK_EQUAL(ctr.connects(), static_cast<size_t>(2));
+ BOOST_CHECK_EQUAL(ctr.disconnects(), static_cast<size_t>(1));