Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #include "validation-common.hpp" |
| 8 | |
| 9 | #include <boost/test/unit_test.hpp> |
| 10 | |
| 11 | namespace nfd { |
| 12 | namespace tests { |
| 13 | |
| 14 | const Name CommandIdentityGlobalFixture::s_identityName("/unit-test/CommandFixture/id"); |
| 15 | shared_ptr<ndn::IdentityCertificate> CommandIdentityGlobalFixture::s_certificate; |
| 16 | |
| 17 | CommandIdentityGlobalFixture::CommandIdentityGlobalFixture() |
| 18 | { |
| 19 | BOOST_ASSERT(!static_cast<bool>(s_certificate)); |
| 20 | s_certificate = m_keys.getCertificate(m_keys.createIdentity(s_identityName)); |
| 21 | } |
| 22 | |
| 23 | CommandIdentityGlobalFixture::~CommandIdentityGlobalFixture() |
| 24 | { |
| 25 | s_certificate.reset(); |
| 26 | m_keys.deleteIdentity(s_identityName); |
| 27 | } |
| 28 | |
| 29 | BOOST_GLOBAL_FIXTURE(CommandIdentityGlobalFixture); |
| 30 | |
| 31 | } // namespace tests |
| 32 | } // namespace nfd |
| 33 | |