security: consolidate creation of identities/keys in the respective containers
Change-Id: I754e5711fd95b97834dd2e9c0ab1830eaff4be35
diff --git a/tests/unit/security/pib/identity.t.cpp b/tests/unit/security/pib/identity.t.cpp
index 97f2369..5a1816e 100644
--- a/tests/unit/security/pib/identity.t.cpp
+++ b/tests/unit/security/pib/identity.t.cpp
@@ -21,8 +21,6 @@
#include "ndn-cxx/security/pib/identity.hpp"
#include "ndn-cxx/security/pib/impl/identity-impl.hpp"
-#include "ndn-cxx/security/pib/impl/pib-memory.hpp"
-#include "ndn-cxx/security/pib/pib.hpp"
#include "tests/boost-test.hpp"
#include "tests/unit/security/pib/pib-data-fixture.hpp"
@@ -32,8 +30,6 @@
namespace pib {
namespace tests {
-using namespace ndn::security::tests;
-
BOOST_AUTO_TEST_SUITE(Security)
BOOST_AUTO_TEST_SUITE(Pib)
BOOST_FIXTURE_TEST_SUITE(TestIdentity, PibDataFixture)
@@ -44,7 +40,7 @@
BOOST_TEST(!id);
BOOST_TEST(id == Identity());
- auto impl = std::make_shared<detail::IdentityImpl>(id1, std::make_shared<PibMemory>(), true);
+ auto impl = std::make_shared<detail::IdentityImpl>(id1, makePibWithIdentity(id1));
id = Identity(impl);
BOOST_TEST(id);
BOOST_TEST(id != Identity());
@@ -58,7 +54,7 @@
// property of pib::Identity in this test case.
BOOST_AUTO_TEST_CASE(SharedImpl)
{
- auto impl = std::make_shared<detail::IdentityImpl>(id1, std::make_shared<pib::PibMemory>(), true);
+ auto impl = std::make_shared<detail::IdentityImpl>(id1, makePibWithIdentity(id1));
Identity identity1(impl);
Identity identity2(impl);