table: MeasurementsAccessor uses StrategyChoice

This commit also deletes fib::Entry::set/getStrategy attribute.

refs #1276

Change-Id: I57dfe842a8024e0ad9908ba8a9c415d5f4ac1bbe
diff --git a/tests/fw/ncc-strategy.cpp b/tests/fw/ncc-strategy.cpp
index 2709913..bb3f640 100644
--- a/tests/fw/ncc-strategy.cpp
+++ b/tests/fw/ncc-strategy.cpp
@@ -37,10 +37,13 @@
 
   Fib& fib = forwarder.getFib();
   shared_ptr<fib::Entry> fibEntry = fib.insert(Name()).first;
-  fibEntry->setStrategy(strategy);
   fibEntry->addNextHop(face1, 10);
   fibEntry->addNextHop(face2, 20);
 
+  StrategyChoice& strategyChoice = forwarder.getStrategyChoice();
+  strategyChoice.install(strategy);
+  strategyChoice.insert(Name(), strategy->getName());
+
   Pit& pit = forwarder.getPit();
 
   // first Interest: strategy knows nothing and follows routing
diff --git a/tests/table/measurements-accessor.cpp b/tests/table/measurements-accessor.cpp
index 77f0526..caeb6d4 100644
--- a/tests/table/measurements-accessor.cpp
+++ b/tests/table/measurements-accessor.cpp
@@ -17,9 +17,8 @@
 class MeasurementsAccessorTestStrategy : public fw::Strategy
 {
 public:
-  explicit
-  MeasurementsAccessorTestStrategy(Forwarder& forwarder)
-    : Strategy(forwarder, "ndn:/MeasurementsAccessorTestStrategy")
+  MeasurementsAccessorTestStrategy(Forwarder& forwarder, const Name& name)
+    : Strategy(forwarder, name)
   {
   }
 
@@ -51,9 +50,9 @@
   Forwarder forwarder;
 
   shared_ptr<MeasurementsAccessorTestStrategy> strategy1 =
-    make_shared<MeasurementsAccessorTestStrategy>(boost::ref(forwarder));
+    make_shared<MeasurementsAccessorTestStrategy>(boost::ref(forwarder), "ndn:/strategy1");
   shared_ptr<MeasurementsAccessorTestStrategy> strategy2 =
-    make_shared<MeasurementsAccessorTestStrategy>(boost::ref(forwarder));
+    make_shared<MeasurementsAccessorTestStrategy>(boost::ref(forwarder), "ndn:/strategy2");
 
   Name nameRoot("ndn:/");
   Name nameA   ("ndn:/A");
@@ -61,10 +60,12 @@
   Name nameABC ("ndn:/A/B/C");
   Name nameAD  ("ndn:/A/D");
 
-  Fib& fib = forwarder.getFib();
-  fib.insert(nameRoot).first->setStrategy(strategy1);
-  fib.insert(nameA   ).first->setStrategy(strategy2);
-  fib.insert(nameAB  ).first->setStrategy(strategy1);
+  StrategyChoice& strategyChoice = forwarder.getStrategyChoice();
+  strategyChoice.install(strategy1);
+  strategyChoice.install(strategy2);
+  strategyChoice.insert(nameRoot, strategy1->getName());
+  strategyChoice.insert(nameA   , strategy2->getName());
+  strategyChoice.insert(nameAB  , strategy1->getName());
 
   MeasurementsAccessor& accessor1 = strategy1->getMeasurements_accessor();
   MeasurementsAccessor& accessor2 = strategy2->getMeasurements_accessor();