blob: 2bcf138a3d05e562b5f9a4a3341571b1b9f42f94 [file] [log] [blame]
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -05001/**
2 * Copyright (C) 2014 Regents of the University of Memphis.
3 * See COPYING for copyright and distribution information.
4 */
5
akmhoquec7a79b22014-05-26 08:06:19 -05006#include <ndn-cxx/util/time.hpp>
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -05007#include "route/fib-entry.hpp"
8#include "route/nexthop-list.hpp"
9#include <boost/test/unit_test.hpp>
10
11namespace nlsr {
12
13namespace test {
14
15BOOST_AUTO_TEST_SUITE(TestFibEntry)
16
17BOOST_AUTO_TEST_CASE(FibEntryConstructorAndGetters)
18{
akmhoquec7a79b22014-05-26 08:06:19 -050019 ndn::time::system_clock::TimePoint testTimePoint = ndn::time::system_clock::now();
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050020 FibEntry fe1("next1");
akmhoquec7a79b22014-05-26 08:06:19 -050021 fe1.setExpirationTimePoint(testTimePoint);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050022
23 BOOST_CHECK_EQUAL(fe1.getName(), "next1");
akmhoquec7a79b22014-05-26 08:06:19 -050024 BOOST_CHECK_EQUAL(fe1.getExpirationTimePoint(), testTimePoint);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050025 BOOST_CHECK_EQUAL(fe1.getSeqNo(), 0); //Default Seq No.
26}
27
28BOOST_AUTO_TEST_SUITE_END()
29
30} //namespace test
31} //namespace nlsr