blob: 82410fe69676097db7107c7b5ef8f152d5b29837 [file] [log] [blame]
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
*
* NDNS is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NDNS_TESTS_UNIT_DATABASE_TEST_DATA_HPP
#define NDNS_TESTS_UNIT_DATABASE_TEST_DATA_HPP
#include "daemon/db-mgr.hpp"
#include "clients/response.hpp"
#include "clients/query.hpp"
#include "validator.hpp"
#include "test-common.hpp"
namespace ndn {
namespace ndns {
namespace tests {
class DbTestData : public IdentityManagementFixture
{
public:
static const boost::filesystem::path TEST_DATABASE;
static const Name TEST_IDENTITY_NAME;
static const boost::filesystem::path TEST_CERT;
DbTestData();
~DbTestData();
private:
void
addRrset(Zone& zone, const Name& label, const name::Component& type,
const time::seconds& ttl, const name::Component& version,
const name::Component& qType, NdnsContentType contentType, const std::string& msg);
public:
class PreviousStateCleaner
{
public:
PreviousStateCleaner();
};
PreviousStateCleaner m_cleaner;
Name m_certName;
std::vector<Zone> m_zones;
std::vector<Rrset> m_rrsets;
std::vector<Link> m_links;
Zone m_root;
Zone m_net;
Zone m_ndnsim;
DbMgr m_session;
};
} // namespace tests
} // namespace ndns
} // namespace ndn
#endif // NDNS_TESTS_UNIT_DATABASE_TEST_DATA_HPP