/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2014-2020, 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/validator.hpp"

#include "io-fixture.hpp"
#include "key-chain-fixture.hpp"

namespace ndn {
namespace ndns {
namespace tests {

class DbTestData : public IoFixture, public KeyChainFixture
{
public:
  static const boost::filesystem::path TEST_DATABASE;
  static const Name TEST_IDENTITY_NAME;
  static const boost::filesystem::path TEST_CERT;
  static const boost::filesystem::path TEST_DKEY_CERT;

  DbTestData();

  ~DbTestData() override;

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_test;
  Zone m_net;
  Zone m_ndnsim;
  DbMgr m_session;

  // test zone identity
  Identity m_identity;

  // test zone dsk
  Certificate m_cert;

  Name m_testName;
  Name m_netName;
  Name m_ndnsimName;
};

} // namespace tests
} // namespace ndns
} // namespace ndn

#endif // NDNS_TESTS_UNIT_DATABASE_TEST_DATA_HPP
