Change namespace of DummyClientFace, Signal, Segmenter

refs #3940

Change-Id: Id014e1487bfaceac96e97af51dcfd77c4964ef11
diff --git a/tests/test-consumer.cpp b/tests/test-consumer.cpp
index 62715bb..5f60a7f 100644
--- a/tests/test-consumer.cpp
+++ b/tests/test-consumer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -26,13 +26,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Name;
 
 BOOST_AUTO_TEST_SUITE(TestConsumer)
 
 BOOST_AUTO_TEST_CASE(AddSubscription)
 {
-  util::DummyClientFace face;
+  ndn::DummyClientFace face;
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
@@ -47,7 +47,7 @@
 
 BOOST_AUTO_TEST_CASE(RemoveSubscription)
 {
-  util::DummyClientFace face;
+  ndn::DummyClientFace face;
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
@@ -64,7 +64,7 @@
 
 BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, tests::IoFixture)
 {
-  util::DummyClientFace face(m_io);
+  ndn::DummyClientFace face(m_io);
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index 7218e6b..ba8260c 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -28,12 +28,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class FullProducerFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestFullProducer, FullProducerFixture)
@@ -71,7 +72,7 @@
   node.m_iblt.appendToName(syncInterestName);
   Interest syncInterest(syncInterestName);
 
-  auto badCompress = std::make_shared<const Buffer>(5);
+  auto badCompress = std::make_shared<const ndn::Buffer>(5);
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, badCompress));
 
   const uint8_t test[] = {'t', 'e', 's', 't'};
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index e0b9bc9..91f95db 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -31,7 +31,8 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class FullSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
@@ -41,8 +42,8 @@
   {
     BOOST_ASSERT(id >= 0 && id < MAX_NODES);
     userPrefixes[id] = "/userPrefix" + std::to_string(id);
-    faces[id] = std::make_unique<util::DummyClientFace>(m_io, m_keyChain,
-                                                        util::DummyClientFace::Options{true, true});
+    faces[id] = std::make_unique<ndn::DummyClientFace>(m_io, m_keyChain,
+                                                       ndn::DummyClientFace::Options{true, true});
     nodes[id] = std::make_unique<FullProducer>(*faces[id], m_keyChain, 40, syncPrefix, userPrefixes[id],
                                                [] (const auto&) {});
   }
@@ -174,7 +175,7 @@
   const Name syncPrefix = "/psync";
   static constexpr int MAX_NODES = 4;
   std::array<Name, MAX_NODES> userPrefixes;
-  std::array<std::unique_ptr<util::DummyClientFace>, MAX_NODES> faces;
+  std::array<std::unique_ptr<ndn::DummyClientFace>, MAX_NODES> faces;
   std::array<std::unique_ptr<FullProducer>, MAX_NODES> nodes;
   static constexpr uint64_t NOT_EXIST = std::numeric_limits<uint64_t>::max();
 };
@@ -467,7 +468,7 @@
 
   int i = 0;
   detail::State state;
-  std::shared_ptr<Buffer> compressed;
+  std::shared_ptr<ndn::Buffer> compressed;
   do {
     auto prefixToPublish = makeSubPrefix(0, i++);
     nodes[0]->addUserNode(prefixToPublish);
@@ -477,7 +478,7 @@
 
     auto block = state.wireEncode();
     compressed = detail::compress(nodes[0]->m_contentCompression, block);
-  } while (compressed->size() < (MAX_NDN_PACKET_SIZE >> 1));
+  } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(10_ms, 100);
 
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index e5ce12f..7843558 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -25,7 +25,7 @@
 namespace psync {
 namespace detail {
 
-using namespace ndn;
+using ndn::Name;
 
 BOOST_AUTO_TEST_SUITE(TestIBLT)
 
@@ -96,7 +96,7 @@
   Name malformedName("/test");
   auto compressed = compress(CompressionScheme::DEFAULT,
                              malformedName.wireEncode().value_bytes());
-  malformedName.append(name::Component(std::move(compressed)));
+  malformedName.append(Name::Component(std::move(compressed)));
   IBLT rcvd2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvd2.initialize(malformedName.at(-1)), IBLT::Error);
 }
diff --git a/tests/test-partial-producer.cpp b/tests/test-partial-producer.cpp
index 3f2ab95..50d7386 100644
--- a/tests/test-partial-producer.cpp
+++ b/tests/test-partial-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -27,12 +27,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class PartialProducerFixture : public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face{m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_keyChain, {true, true}};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestPartialProducer, PartialProducerFixture)
@@ -46,8 +47,8 @@
 
   BOOST_REQUIRE_EQUAL(m_face.sentInterests.size(), 1);
   auto interest = m_face.sentInterests.front();
-  BOOST_CHECK_EQUAL(interest.getName().at(3), name::Component("register"));
-  nfd::ControlParameters params(interest.getName().at(4).blockFromValue());
+  BOOST_CHECK_EQUAL(interest.getName().at(3), Name::Component("register"));
+  ndn::nfd::ControlParameters params(interest.getName().at(4).blockFromValue());
   BOOST_CHECK_EQUAL(params.getName(), syncPrefix);
 }
 
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index 801d061..2526d2c 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -29,7 +29,8 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class PartialSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
@@ -52,8 +53,8 @@
   void
   addConsumer(int id, const std::vector<std::string>& subscribeTo, bool linkToProducer = true)
   {
-    consumerFaces[id] = std::make_unique<util::DummyClientFace>(m_io, m_keyChain,
-                                                                util::DummyClientFace::Options{true, true});
+    consumerFaces[id] = std::make_unique<ndn::DummyClientFace>(m_io, m_keyChain,
+                                                               ndn::DummyClientFace::Options{true, true});
     if (linkToProducer) {
       face.linkTo(*consumerFaces[id]);
     }
@@ -132,7 +133,7 @@
   }
 
 protected:
-  util::DummyClientFace face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace face{m_io, m_keyChain, {true, true}};
   const Name syncPrefix{"psync"};
   const Name userPrefix{"testUser-0"};
 
@@ -140,7 +141,7 @@
   std::map<Name, uint64_t> oldSeqMap;
 
   std::array<std::unique_ptr<Consumer>, 3> consumers;
-  std::array<std::unique_ptr<util::DummyClientFace>, 3> consumerFaces;
+  std::array<std::unique_ptr<ndn::DummyClientFace>, 3> consumerFaces;
   int numHelloDataRcvd = 0;
   int numSyncDataRcvd = 0;
 };
@@ -289,7 +290,7 @@
   // Link to first producer goes down
   face.unlink();
 
-  util::DummyClientFace face2(m_io, m_keyChain, {true, true});
+  ndn::DummyClientFace face2(m_io, m_keyChain, {true, true});
   PartialProducer replicatedProducer(face2, m_keyChain, 40, syncPrefix, userPrefix);
   for (int i = 1; i < 10; i++) {
     replicatedProducer.addUserNode("testUser-" + std::to_string(i));
@@ -339,7 +340,7 @@
 
   bool nackRcvd = false;
   for (const auto& data : face.sentData) {
-    if (data.getContentType() == tlv::ContentType_Nack) {
+    if (data.getContentType() == ndn::tlv::ContentType_Nack) {
       nackRcvd = true;
       break;
     }
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index 67d4aa2..4886339 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -26,12 +26,12 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Name;
 
 class ProducerBaseFixture : public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face;
+  ndn::DummyClientFace m_face;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestProducerBase, ProducerBaseFixture)
@@ -73,7 +73,7 @@
   m_face.processEvents(10_ms);
 
   BOOST_REQUIRE_EQUAL(m_face.sentData.size(), 1);
-  BOOST_CHECK_EQUAL(m_face.sentData.front().getContentType(), tlv::ContentType_Nack);
+  BOOST_CHECK_EQUAL(m_face.sentData.front().getContentType(), ndn::tlv::ContentType_Nack);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-segment-publisher.cpp b/tests/test-segment-publisher.cpp
index 210555d..e363523 100644
--- a/tests/test-segment-publisher.cpp
+++ b/tests/test-segment-publisher.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -30,14 +30,16 @@
 
 namespace psync {
 
-using namespace ndn;
+using namespace ndn::time_literals;
+using ndn::Interest;
+using ndn::Name;
 
 class SegmentPublisherFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 protected:
   SegmentPublisherFixture()
   {
-    m_face.setInterestFilter(InterestFilter("/hello/world"),
+    m_face.setInterestFilter(ndn::InterestFilter("/hello/world"),
                              bind(&SegmentPublisherFixture::onInterest, this, _2),
                              [] (auto&&...) { BOOST_CHECK(false); });
     advanceClocks(10_ms);
@@ -55,7 +57,7 @@
   void
   expressInterest(const Interest& interest)
   {
-    fetcher = util::SegmentFetcher::start(m_face, interest, security::getAcceptAllValidator());
+    fetcher = ndn::SegmentFetcher::start(m_face, interest, ndn::security::getAcceptAllValidator());
     fetcher->onComplete.connect([this] (auto&&...) { numComplete++; });
     fetcher->onError.connect([] (auto&&...) { BOOST_CHECK(false); });
 
@@ -80,16 +82,16 @@
   }
 
 protected:
-  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
   SegmentPublisher publisher{m_face, m_keyChain};
-  std::shared_ptr<util::SegmentFetcher> fetcher;
+  std::shared_ptr<ndn::SegmentFetcher> fetcher;
   Name dataName;
   detail::State state;
 
   int numComplete = 0;
   int numRepliesFromStore = 0;
 
-  static constexpr time::milliseconds freshness = 1_s;
+  static constexpr ndn::time::milliseconds freshness = 1_s;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSegmentPublisher, SegmentPublisherFixture)