blob: fb6a8fbfba63b0cc95a56d19f9cf73d57916c73a [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
6#include "route/nexthop.hpp"
7#include <boost/test/unit_test.hpp>
8
9namespace nlsr {
10
11namespace test {
12
13BOOST_AUTO_TEST_SUITE(TestNexthop)
14
15BOOST_AUTO_TEST_CASE(NexthopSetAndGet)
16{
17 NextHop np1;
18
akmhoque157b0a42014-05-13 00:26:37 -050019 np1.setConnectingFaceUri("udp://test/uri");
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050020
21 np1.setRouteCost(10.5);
22
akmhoque157b0a42014-05-13 00:26:37 -050023 BOOST_CHECK_EQUAL(np1.getConnectingFaceUri(), "udp://test/uri");
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050024 BOOST_CHECK_CLOSE(np1.getRouteCost(), 10.5, 0.0001);
25}
26
27BOOST_AUTO_TEST_SUITE_END()
28
29} //namespace test
30} //namespace nlsr