Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame^] | 1 | /* -*- 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 | |
| 16 | using namespace ndn; |
| 17 | namespace fs = boost::filesystem; |
| 18 | |
| 19 | BOOST_AUTO_TEST_SUITE(TestContactStorage) |
| 20 | |
| 21 | const std::string dbName("chronos-20e9530008b27c661ad3429d1956fa1c509b652dce9273bfe81b7c91819c272c.db"); |
| 22 | |
| 23 | BOOST_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 | |
| 35 | BOOST_AUTO_TEST_SUITE_END() |