blob: 12b2a543e8c721c1f7fe7464ca190dd499c7333d [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * See COPYING for copyright and distribution information.
6 */
7
8#include <boost/test/unit_test.hpp>
9
10#include "contact-storage.h"
11#include <cryptopp/hex.h>
12#include <cryptopp/sha.h>
13#include <cryptopp/files.h>
14#include <boost/filesystem.hpp>
15
16using namespace ndn;
17namespace fs = boost::filesystem;
18
19BOOST_AUTO_TEST_SUITE(TestContactStorage)
20
21const std::string dbName("chronos-20e9530008b27c661ad3429d1956fa1c509b652dce9273bfe81b7c91819c272c.db");
22
23BOOST_AUTO_TEST_CASE(InitializeTable)
24{
25 Name identity("/TestContactStorage/InitializeTable");
26
27 chronos::ContactStorage contactStorage(identity);
28 fs::path dbPath = fs::path(getenv("HOME")) / ".chronos" / dbName;
29
30 BOOST_CHECK(boost::filesystem::exists(dbPath));
31}
32
33
34
35BOOST_AUTO_TEST_SUITE_END()