src: decouple classes from Nlsr object

refs: #1952, #2803, #3960, #4288

Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
diff --git a/tests/update/test-advertise-crash.cpp b/tests/update/test-advertise-crash.cpp
index fd760aa..7f0cad3 100644
--- a/tests/update/test-advertise-crash.cpp
+++ b/tests/update/test-advertise-crash.cpp
@@ -24,7 +24,6 @@
 #include "../test-common.hpp"
 
 namespace nlsr {
-namespace update {
 namespace test {
 
 class AdvertiseCrashFixture : public nlsr::test::UnitTestTimeFixture
@@ -32,14 +31,15 @@
 public:
   AdvertiseCrashFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , nlsr(m_ioService, m_scheduler, face, m_keyChain)
-    , namePrefixList(nlsr.getNamePrefixList())
-    , updatePrefixUpdateProcessor(nlsr.getPrefixUpdateProcessor())
+    , conf(face)
+    , confProcessor(conf)
+    , nlsr(face, m_keyChain, conf)
+    , namePrefixList(conf.getNamePrefixList())
   {
     // Add an adjacency to nlsr
     Adjacent adj("/ndn/edu/test-site-2/%C1.Router/test",
                  ndn::FaceUri("udp://1.0.0.2"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
-    nlsr.getAdjacencyList().insert(adj);
+    conf.getAdjacencyList().insert(adj);
 
     // Create a face dataset response with the face having the same uri as
     // the adjacent
@@ -49,11 +49,7 @@
 
     std::vector<ndn::nfd::FaceStatus> faces{payload1};
 
-    // Set the network so the LSA prefix is constructed
-    nlsr.getConfParameter().setNetwork("/ndn");
-    nlsr.getConfParameter().setRouterName(ndn::Name("/This/router"));
-
-    addIdentity(ndn::Name("/ndn/This/router"));
+    addIdentity(conf.getRouterPrefix());
 
     // So that NLSR starts listening on prefixes
     nlsr.initialize();
@@ -70,10 +66,11 @@
 
 public:
   ndn::util::DummyClientFace face;
+  ConfParameter conf;
+  DummyConfFileProcessor confProcessor;
 
   Nlsr nlsr;
   NamePrefixList& namePrefixList;
-  PrefixUpdateProcessor& updatePrefixUpdateProcessor;
 };
 
 BOOST_FIXTURE_TEST_CASE(TestAdvertiseCrash, AdvertiseCrashFixture)
@@ -96,5 +93,4 @@
 }
 
 } // namespace test
-} // namespace update
 } // namespace nlsr