fw: remove reliance upon marker name components

refs #5044

Change-Id: Iea6c98e03dbd3e4463f7bb6fca0be4953a2cdc40
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 9b22403..4b5345e 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -179,7 +179,7 @@
   faceTable.add(face1);
   faceTable.add(face2);
 
-  Name strategyA("/strategyA/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
@@ -219,7 +219,7 @@
   faceTable.add(face2);
   faceTable.add(face3);
 
-  Name strategyA("/strategyA/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
@@ -251,7 +251,7 @@
   auto face = make_shared<DummyFace>();
   faceTable.add(face);
 
-  Name strategyA("/strategyA/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
@@ -281,8 +281,8 @@
   faceTable.add(face2);
   faceTable.add(face3);
 
-  Name strategyA("/strategyA/%FD%01");
-  Name strategyB("/strategyB/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
+  auto strategyB = Name("/strategyB").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   PitExpiryTestStrategy::registerAs(strategyB);
   auto& sA = choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
@@ -336,7 +336,7 @@
   faceTable.add(face1);
   faceTable.add(face2);
 
-  Name strategyA("/strategyA/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   auto& sA = choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
@@ -385,7 +385,7 @@
   faceTable.add(face2);
   faceTable.add(face3);
 
-  Name strategyA("/strategyA/%FD%01");
+  auto strategyA = Name("/strategyA").appendVersion(1);
   PitExpiryTestStrategy::registerAs(strategyA);
   choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
index c253bb8..858ea40 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/daemon/mgmt/manager-base.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -129,7 +129,7 @@
 
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
   BOOST_CHECK_EQUAL(m_responses[0].getName(),
-                    Name("/localhost/nfd/test-module/test-notification/%FE%00"));
+                    Name("/localhost/nfd/test-module/test-notification").appendSequenceNumber(0));
 }
 
 BOOST_AUTO_TEST_CASE(ExtractRequester)
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index ae96352..7fdd8fa 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,7 +40,7 @@
   StrategyChoiceManagerFixture()
     : sc(m_forwarder.getStrategyChoice())
     , manager(sc, m_dispatcher, *m_authenticator)
-    , strategyNameP("/strategy-choice-manager-P/%FD%02")
+    , strategyNameP(Name("/strategy-choice-manager-P").appendVersion(2))
   {
     VersionedDummyStrategy<2>::registerAs(strategyNameP);
 
diff --git a/tests/daemon/mgmt/tables-config-section.t.cpp b/tests/daemon/mgmt/tables-config-section.t.cpp
index 3f77a1d..df9992f 100644
--- a/tests/daemon/mgmt/tables-config-section.t.cpp
+++ b/tests/daemon/mgmt/tables-config-section.t.cpp
@@ -45,9 +45,9 @@
     , strategyChoice(forwarder.getStrategyChoice())
     , networkRegionTable(forwarder.getNetworkRegionTable())
     , tablesConfig(forwarder)
-    , strategyP("/tables-config-section-strategy-P/%FD%02")
-    , strategyP1("/tables-config-section-strategy-P/%FD%01")
-    , strategyQ("/tables-config-section-strategy-Q/%FD%02")
+    , strategyP(Name("/tables-config-section-strategy-P").appendVersion(2))
+    , strategyP1(Name("/tables-config-section-strategy-P").appendVersion(1))
+    , strategyQ(Name("/tables-config-section-strategy-Q").appendVersion(2))
   {
     DummyStrategy::registerAs(strategyP);
     DummyStrategy::registerAs(strategyP1);
diff --git a/tests/daemon/table/measurements-accessor.t.cpp b/tests/daemon/table/measurements-accessor.t.cpp
index 1c5a850..67e0623 100644
--- a/tests/daemon/table/measurements-accessor.t.cpp
+++ b/tests/daemon/table/measurements-accessor.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -63,8 +63,8 @@
 protected:
   MeasurementsAccessorFixture()
   {
-    const Name strategyP("/measurements-accessor-test-strategy-P/%FD%01");
-    const Name strategyQ("/measurements-accessor-test-strategy-Q/%FD%01");
+    const auto strategyP = Name("/measurements-accessor-test-strategy-P").appendVersion(1);
+    const auto strategyQ = Name("/measurements-accessor-test-strategy-Q").appendVersion(1);
     MeasurementsAccessorTestStrategy::registerAs(strategyP);
     MeasurementsAccessorTestStrategy::registerAs(strategyQ);
 
diff --git a/tests/daemon/table/strategy-choice.t.cpp b/tests/daemon/table/strategy-choice.t.cpp
index 8c52b54..d99ff44 100644
--- a/tests/daemon/table/strategy-choice.t.cpp
+++ b/tests/daemon/table/strategy-choice.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -78,8 +78,8 @@
   Forwarder forwarder{faceTable};
   StrategyChoice& sc{forwarder.getStrategyChoice()};
 
-  const Name strategyNameP = "/strategy-choice-P/%FD%00";
-  const Name strategyNameQ = "/strategy-choice-Q/%FD%00";
+  const Name strategyNameP = Name("/strategy-choice-P").appendVersion(0);
+  const Name strategyNameQ = Name("/strategy-choice-Q").appendVersion(0);
 };
 
 BOOST_AUTO_TEST_SUITE(Table)
@@ -87,13 +87,13 @@
 
 BOOST_AUTO_TEST_CASE(Versioning)
 {
-  const Name strategyNameV("/strategy-choice-V");
-  const Name strategyNameV0("/strategy-choice-V/%FD%00");
-  const Name strategyNameV1("/strategy-choice-V/%FD%01");
-  const Name strategyNameV2("/strategy-choice-V/%FD%02");
-  const Name strategyNameV3("/strategy-choice-V/%FD%03");
-  const Name strategyNameV4("/strategy-choice-V/%FD%04");
-  const Name strategyNameV5("/strategy-choice-V/%FD%05");
+  const auto strategyNameV = Name("/strategy-choice-V");
+  const auto strategyNameV0 = Name("/strategy-choice-V").appendVersion(0);
+  const auto strategyNameV1 = Name("/strategy-choice-V").appendVersion(1);
+  const auto strategyNameV2 = Name("/strategy-choice-V").appendVersion(2);
+  const auto strategyNameV3 = Name("/strategy-choice-V").appendVersion(3);
+  const auto strategyNameV4 = Name("/strategy-choice-V").appendVersion(4);
+  const auto strategyNameV5 = Name("/strategy-choice-V").appendVersion(5);
 
   VersionedDummyStrategy<1>::registerAs(strategyNameV1);
   VersionedDummyStrategy<3>::registerAs(strategyNameV3);
@@ -171,7 +171,7 @@
 
 BOOST_AUTO_TEST_CASE(FindEffectiveStrategy)
 {
-  const Name strategyNameZ("/strategy-choice-Z/%FD%00"); // unregistered strategyName
+  const auto strategyNameZ = Name("/strategy-choice-Z").appendVersion(0); // unregistered strategyName
 
   BOOST_CHECK(sc.insert("/", strategyNameP));
   // { '/'=>P }
diff --git a/tests/other/fw/congestion-mark-strategy.cpp b/tests/other/fw/congestion-mark-strategy.cpp
index 672e9ef..71afcbc 100644
--- a/tests/other/fw/congestion-mark-strategy.cpp
+++ b/tests/other/fw/congestion-mark-strategy.cpp
@@ -72,7 +72,7 @@
 const Name&
 CongestionMarkStrategy::getStrategyName()
 {
-  static Name strategyName("/localhost/nfd/strategy/congestion-mark/%FD%01");
+  static const auto strategyName = Name("/localhost/nfd/strategy/congestion-mark").appendVersion(1);
   return strategyName;
 }
 
diff --git a/tests/tools/nfdc/strategy-choice-module.t.cpp b/tests/tools/nfdc/strategy-choice-module.t.cpp
index dc4965a..634682b 100644
--- a/tests/tools/nfdc/strategy-choice-module.t.cpp
+++ b/tests/tools/nfdc/strategy-choice-module.t.cpp
@@ -48,11 +48,11 @@
 
     StrategyChoice entry1;
     entry1.setName("/");
-    entry1.setStrategy("/strategyP/%FD%01");
+    entry1.setStrategy(Name("/strategyP").appendVersion(1));
 
     StrategyChoice entry2;
     entry2.setName("/52VRvpL9/Yqfut4TNHv");
-    entry2.setStrategy("/strategyQ/%FD%02");
+    entry2.setStrategy(Name("/strategyQ").appendVersion(2));
 
     this->sendDataset(interest.getName(), entry1, entry2);
     return true;
@@ -139,7 +139,7 @@
 
     ControlParameters resp;
     resp.setName("/VBXSJg3m/XYs81ARNhx");
-    resp.setStrategy("/strategyP/%FD%05");
+    resp.setStrategy(Name("/strategyP").appendVersion(5));
     this->succeedCommand(interest, resp);
   };
 
@@ -248,10 +248,10 @@
   this->fetchStatus();
   StrategyChoice payload1;
   payload1.setName("/")
-          .setStrategy("/localhost/nfd/strategy/best-route/%FD%04");
+          .setStrategy(Name("/localhost/nfd/strategy/best-route").appendVersion(4));
   StrategyChoice payload2;
   payload2.setName("/localhost")
-          .setStrategy("/localhost/nfd/strategy/multicast/%FD%04");
+          .setStrategy(Name("/localhost/nfd/strategy/multicast").appendVersion(4));
   this->sendDataset("/localhost/nfd/strategy-choice/list", payload1, payload2);
   this->prepareStatusOutput();