tests: Use ndn-cxx/DummyClientFace
refs: #2637
Change-Id: Ife16a81d08e538b4b0a82f1f5d4cc819fc764257
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index 2595e41..56a990f 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -20,22 +20,22 @@
**/
#include "test-common.hpp"
-#include "dummy-face.hpp"
#include "nlsr.hpp"
#include "communication/sync-logic-handler.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
+
namespace nlsr {
namespace test {
-using ndn::DummyFace;
using ndn::shared_ptr;
class SyncLogicFixture : public BaseFixture
{
public:
SyncLogicFixture()
- : face(ndn::makeDummyFace())
+ : face(make_shared<ndn::util::DummyClientFace>())
, nlsr(g_ioService, g_scheduler, ndn::ref(*face))
, sync(nlsr.getSyncLogicHandler())
, CONFIG_NETWORK("/ndn")
@@ -57,7 +57,7 @@
updates.push_back(info);
face->processEvents(ndn::time::milliseconds(1));
- face->m_sentInterests.clear();
+ face->sentInterests.clear();
sync.onNsyncUpdate(updates, NULL);
@@ -65,7 +65,7 @@
}
public:
- shared_ptr<DummyFace> face;
+ shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
SyncLogicHandler& sync;
@@ -83,7 +83,7 @@
receiveUpdate(updateName, 1);
- std::vector<ndn::Interest>& interests = face->m_sentInterests;
+ std::vector<ndn::Interest>& interests = face->sentInterests;
BOOST_REQUIRE_EQUAL(interests.size(), 3);
std::vector<ndn::Interest>::iterator it = interests.begin();
@@ -103,7 +103,7 @@
receiveUpdate(updateName, 1);
- std::vector<ndn::Interest>& interests = face->m_sentInterests;
+ std::vector<ndn::Interest>& interests = face->sentInterests;
BOOST_CHECK_EQUAL(interests.size(), 0);
}
@@ -112,7 +112,7 @@
std::string updateName = CONFIG_SITE + nlsr.getConfParameter().getLsaPrefix().toUri() +
CONFIG_ROUTER_NAME;
- std::vector<ndn::Interest>& interests = face->m_sentInterests;
+ std::vector<ndn::Interest>& interests = face->sentInterests;
BOOST_CHECK_EQUAL(interests.size(), 0);
}
@@ -145,21 +145,21 @@
uint64_t lowerSeqNo = static_cast<uint64_t>(998) << 40;
receiveUpdate(updateName, lowerSeqNo);
- std::vector<ndn::Interest>& interests = face->m_sentInterests;
+ std::vector<ndn::Interest>& interests = face->sentInterests;
BOOST_REQUIRE_EQUAL(interests.size(), 0);
// Same NameLSA sequence number
uint64_t sameSeqNo = static_cast<uint64_t>(999) << 40;
receiveUpdate(updateName, sameSeqNo);
- interests = face->m_sentInterests;
+ interests = face->sentInterests;
BOOST_REQUIRE_EQUAL(interests.size(), 0);
// Higher NameLSA sequence number
uint64_t higherSeqNo = static_cast<uint64_t>(1000) << 40;
receiveUpdate(updateName, higherSeqNo);
- interests = face->m_sentInterests;
+ interests = face->sentInterests;
BOOST_REQUIRE_EQUAL(interests.size(), 1);
std::vector<ndn::Interest>::iterator it = interests.begin();