blob: da0dbfa74f084e101d94b18981056e4cb0c56790 [file] [log] [blame]
shockjianga5ae48c2014-07-27 23:21:41 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2014, Regents of the University of California.
4 *
5 * This file is part of NDNS (Named Data Networking Domain Name Service).
6 * See AUTHORS.md for complete list of NDNS authors and contributors.
7 *
8 * NDNS is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22/**
23 * Copyright (c) 2014, Regents of the University of California.
24 *
25 * This file is part of NDNS (Named Data Networking Domain Name Service).
26 * See AUTHORS.md for complete list of NDNS authors and contributors.
27 *
28 * NDNS is free software: you can redistribute it and/or modify it under the terms
29 * of the GNU General Public License as published by the Free Software Foundation,
30 * either version 3 of the License, or (at your option) any later version.
31 *
32 * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
33 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
34 * PURPOSE. See the GNU General Public License for more details.
35 *
36 * You should have received a copy of the GNU General Public License along with
37 * NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
38 */
39
40#include "app/name-server.hpp"
41#include "../boost-test.hpp"
42#include <time.h>
43
44//#include <boost/test/test_tools.hpp>
45//#include <string>
46
47namespace ndn {
48namespace ndns {
49namespace tests {
50
51using namespace std;
52
53BOOST_AUTO_TEST_SUITE(nameServer)
54
55BOOST_AUTO_TEST_CASE(Protocol)
56{
57 string label = "nameServer::Protocol";
58 printbegin(label);
59
60 Name name("/DNS/net/NS");
61 Interest interest;
62 interest.setName(name);
63
64
65 string program = "name-server-daemon";
66 string prefix = "/";
67
68 const char* pro = program.c_str();
69 const char * pre = prefix.c_str();
70 NameServer server(pro, pre, pre);
71
72 server.onInterest(name, interest);
73
74
75
76 printend(label);
77}
78
79BOOST_AUTO_TEST_SUITE_END()
80
81} // namespace tests
82} // namespace ndns
83} // namespace ndn
84