Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2014 Regents of the University of Memphis. |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
akmhoque | c7a79b2 | 2014-05-26 08:06:19 -0500 | [diff] [blame] | 6 | #include <ndn-cxx/util/time.hpp> |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 7 | #include "route/fib-entry.hpp" |
| 8 | #include "route/nexthop-list.hpp" |
| 9 | #include <boost/test/unit_test.hpp> |
| 10 | |
| 11 | namespace nlsr { |
| 12 | |
| 13 | namespace test { |
| 14 | |
| 15 | BOOST_AUTO_TEST_SUITE(TestFibEntry) |
| 16 | |
| 17 | BOOST_AUTO_TEST_CASE(FibEntryConstructorAndGetters) |
| 18 | { |
akmhoque | c7a79b2 | 2014-05-26 08:06:19 -0500 | [diff] [blame] | 19 | ndn::time::system_clock::TimePoint testTimePoint = ndn::time::system_clock::now(); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 20 | FibEntry fe1("next1"); |
akmhoque | c7a79b2 | 2014-05-26 08:06:19 -0500 | [diff] [blame] | 21 | fe1.setExpirationTimePoint(testTimePoint); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 22 | |
| 23 | BOOST_CHECK_EQUAL(fe1.getName(), "next1"); |
akmhoque | c7a79b2 | 2014-05-26 08:06:19 -0500 | [diff] [blame] | 24 | BOOST_CHECK_EQUAL(fe1.getExpirationTimePoint(), testTimePoint); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 25 | BOOST_CHECK_EQUAL(fe1.getSeqNo(), 0); //Default Seq No. |
| 26 | } |
| 27 | |
| 28 | BOOST_AUTO_TEST_SUITE_END() |
| 29 | |
| 30 | } //namespace test |
| 31 | } //namespace nlsr |