src: decouple classes from Nlsr object
refs: #1952, #2803, #3960, #4288
Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index 05e5a0f..840de0b 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2018, The University of Memphis,
+ * Copyright (c) 2014-2019, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -46,14 +46,13 @@
public:
PublisherFixture()
: face(m_ioService, m_keyChain, {true, true})
- , nlsr(m_ioService, m_scheduler, face, m_keyChain)
- , lsdb(nlsr.getLsdb())
- , rt1(nlsr.getRoutingTable())
+ , conf(face)
+ , confProcessor(conf)
+ , nlsr(face, m_keyChain, conf)
+ , lsdb(nlsr.m_lsdb)
+ , rt1(nlsr.m_routingTable)
{
- nlsr.getConfParameter().setNetwork("/ndn");
- nlsr.getConfParameter().setRouterName("/This/Router");
-
- routerId = addIdentity("/ndn/This/Router");
+ routerId = addIdentity(conf.getRouterPrefix());
nlsr.initialize();
face.processEvents(ndn::time::milliseconds(100));
@@ -178,7 +177,8 @@
public:
ndn::util::DummyClientFace face;
-
+ ConfParameter conf;
+ DummyConfFileProcessor confProcessor;
Nlsr nlsr;
Lsdb& lsdb;