table: StrategyChoice uses unique_ptr instead of shared_ptr

refs #3164

Change-Id: Id3110f72aab83982b0768e596a04bad9f7336975
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 90789a0..5915e3e 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -31,8 +31,10 @@
 #include "table/name-tree.hpp"
 #include "table/strategy-choice.hpp"
 #include "fw/strategy.hpp"
+
 #include "tests/daemon/face/dummy-face.hpp"
 #include "tests/daemon/fw/dummy-strategy.hpp"
+#include "tests/daemon/fw/install-strategy.hpp"
 
 #include <ndn-cxx/util/random.hpp>
 #include <ndn-cxx/management/nfd-strategy-choice.hpp>
@@ -52,9 +54,9 @@
 
 public:
   void
-  installStrategy(const Name& strategy)
+  installStrategy(const Name& strategyName)
   {
-    m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder), strategy));
+    install<DummyStrategy>(m_forwarder, strategyName);
   }
 
   const Name&
diff --git a/tests/daemon/mgmt/tables-config-section.t.cpp b/tests/daemon/mgmt/tables-config-section.t.cpp
index 5d9b636..f3cf743 100644
--- a/tests/daemon/mgmt/tables-config-section.t.cpp
+++ b/tests/daemon/mgmt/tables-config-section.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,9 @@
 #include "mgmt/tables-config-section.hpp"
 #include "fw/forwarder.hpp"
 
-
 #include "tests/test-common.hpp"
-#include "tests/daemon/fw/dummy-strategy.hpp"
+#include "../fw/dummy-strategy.hpp"
+#include "../fw/install-strategy.hpp"
 
 namespace nfd {
 namespace tests {
@@ -185,10 +185,8 @@
     "  }\n"
     "}\n";
 
-  m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
-                                                      "/localhost/nfd/strategy/test-strategy-a"));
-  m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
-                                                      "/localhost/nfd/strategy/test-strategy-b"));
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-a");
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-b");
 
   BOOST_REQUIRE_NO_THROW(runConfig(CONFIG, true));
   {
@@ -224,13 +222,8 @@
     "}\n";
 
 
-  auto version1 = make_shared<DummyStrategy>(ref(m_forwarder),
-                                             "/localhost/nfd/strategy/test-strategy-a/%FD%01");
-
-  auto version2 = make_shared<DummyStrategy>(ref(m_forwarder),
-                                             "/localhost/nfd/strategy/test-strategy-a/%FD%02");
-  m_strategyChoice.install(version1);
-  m_strategyChoice.install(version2);
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-a/%FD%01");
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-a/%FD%02");
 
   BOOST_REQUIRE_NO_THROW(runConfig(CONFIG, true));
   {
@@ -287,8 +280,7 @@
     "}\n";
 
 
-  m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
-                                                      "/localhost/nfd/strategy/test-strategy-a"));
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-a");
 
   BOOST_CHECK_THROW(runConfig(CONFIG, true), ConfigFile::Error);
   BOOST_CHECK_THROW(runConfig(CONFIG, false), ConfigFile::Error);
@@ -307,10 +299,8 @@
     "  }\n"
     "}\n";
 
-  m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
-                                                      "/localhost/nfd/strategy/test-strategy-a"));
-  m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
-                                                      "/localhost/nfd/strategy/test-strategy-b"));
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-a");
+  install<DummyStrategy>(m_forwarder, "/localhost/nfd/strategy/test-strategy-b");
 
   BOOST_CHECK_THROW(runConfig(CONFIG, true), ConfigFile::Error);
   BOOST_CHECK_THROW(runConfig(CONFIG, false), ConfigFile::Error);