tests: sync common testing infrastructure with ndn-cxx
Change-Id: I1e5cdcda8f6d3d9f9addc7a9f17359aedef9db7e
diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index 3c71f74..b493290 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -20,11 +20,11 @@
*/
#include "communication/sync-logic-handler.hpp"
-#include "tests/test-common.hpp"
-#include "common.hpp"
#include "nlsr.hpp"
-#include <ndn-cxx/util/dummy-client-face.hpp>
+#include "tests/io-key-chain-fixture.hpp"
+#include "tests/test-common.hpp"
+
#include <boost/lexical_cast.hpp>
namespace nlsr {
@@ -32,7 +32,7 @@
using std::shared_ptr;
-class SyncLogicFixture : public UnitTestTimeFixture
+class SyncLogicFixture : public IoKeyChainFixture
{
public:
SyncLogicFixture()
@@ -42,7 +42,7 @@
this->conf.getSiteName().toUri() +
"/%C1.Router/other-router/")
{
- addIdentity(conf.getRouterPrefix());
+ m_keyChain.createIdentity(conf.getRouterPrefix());
}
void
@@ -59,16 +59,16 @@
}
public:
- ndn::util::DummyClientFace face{m_ioService, m_keyChain};
+ ndn::util::DummyClientFace face{m_io, m_keyChain};
ConfParameter conf{face, m_keyChain};
DummyConfFileProcessor confProcessor{conf, SYNC_PROTOCOL_PSYNC};
SyncLogicHandler::IsLsaNew testIsLsaNew;
SyncLogicHandler sync;
const std::string updateNamePrefix;
- const std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME,
- Lsa::Type::ADJACENCY,
- Lsa::Type::COORDINATE};
+ const std::vector<Lsa::Type> lsaTypes{Lsa::Type::NAME,
+ Lsa::Type::ADJACENCY,
+ Lsa::Type::COORDINATE};
};
BOOST_FIXTURE_TEST_SUITE(TestSyncLogicHandler, SyncLogicFixture)