tests: namespace cleanup
Change-Id: I6b9ee82a4cb3b97c82ea111495ec07efddc8d825
diff --git a/tests/test-conf-parameter.cpp b/tests/test-conf-parameter.cpp
index cb52323..a5f63bc 100644
--- a/tests/test-conf-parameter.cpp
+++ b/tests/test-conf-parameter.cpp
@@ -25,10 +25,7 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace nlsr {
-namespace test {
-
-using namespace std;
+namespace nlsr::tests {
BOOST_AUTO_TEST_SUITE(TestConfParameter)
@@ -38,74 +35,42 @@
ndn::KeyChain keyChain;
ConfParameter cp1(face, keyChain);
- const string NAME = "router1";
- const string SITE = "memphis";
- const string NETWORK = "ATT";
-
- cp1.setRouterName(NAME);
-
- cp1.setSiteName(SITE);
-
- cp1.setNetwork(NETWORK);
-
+ cp1.setRouterName("router1");
+ cp1.setSiteName("memphis");
+ cp1.setNetwork("ATT");
cp1.setInterestRetryNumber(2);
-
cp1.setInterestResendTime(1000);
-
cp1.setLsaRefreshTime(1500);
-
cp1.setLsaInterestLifetime(ndn::time::seconds(1));
-
cp1.setSyncProtocol(SyncProtocol::PSYNC);
-
cp1.setRouterDeadInterval(10);
-
cp1.setMaxFacesPerPrefix(50);
-
cp1.setHyperbolicState(HYPERBOLIC_STATE_ON);
-
cp1.setCorR(2.5);
-
std::vector<double> angles = {102.5};
-
cp1.setCorTheta(angles);
-
cp1.setInfoInterestInterval(3);
BOOST_CHECK_EQUAL(cp1.getRouterName(), "router1");
-
BOOST_CHECK_EQUAL(cp1.getSiteName(), "memphis");
-
BOOST_CHECK_EQUAL(cp1.getNetwork(), "ATT");
cp1.buildRouterAndSyncUserPrefix();
BOOST_CHECK_EQUAL(cp1.getRouterPrefix(), "/ATT/memphis/router1");
-
BOOST_CHECK_EQUAL(cp1.getSyncUserPrefix(), "/localhop/ATT/nlsr/LSA/memphis/router1");
-
BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), 2);
-
BOOST_CHECK_EQUAL(cp1.getInterestResendTime(), 1000);
-
BOOST_CHECK_EQUAL(cp1.getLsaRefreshTime(), 1500);
-
BOOST_CHECK_EQUAL(cp1.getLsaInterestLifetime(), ndn::time::seconds(1));
-
BOOST_CHECK(cp1.getSyncProtocol() == SyncProtocol::PSYNC);
-
BOOST_CHECK_EQUAL(cp1.getRouterDeadInterval(), 10);
-
BOOST_CHECK_EQUAL(cp1.getMaxFacesPerPrefix(), 50);
-
BOOST_CHECK_EQUAL(cp1.getHyperbolicState(), HYPERBOLIC_STATE_ON);
-
BOOST_CHECK(cp1.getCorTheta() == angles);
-
BOOST_CHECK_EQUAL(cp1.getInfoInterestInterval(), 3);
}
BOOST_AUTO_TEST_SUITE_END()
-} // namespace test
-} // namespace nlsr
+} // namespace nlsr::tests