blob: e10e30b9f09a677bd14f41611226ba836c93183b [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 "adjacent.hpp"
7#include <boost/test/unit_test.hpp>
8
9namespace nlsr {
10
11namespace test {
12
13using namespace std;
14
15BOOST_AUTO_TEST_SUITE(TestAdjacenct)
16
17BOOST_AUTO_TEST_CASE(AdjacenctBasic)
18{
19 const string ADJ_NAME_1 = "testname";
20 const string ADJ_NAME_2 = "testname";
21
22 Adjacent adjacent1(ADJ_NAME_1);
23 Adjacent adjacent2(ADJ_NAME_2);
akmhoquefdbddb12014-05-02 18:35:19 -050024 BOOST_CHECK(adjacent1 == adjacent2);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050025
26 adjacent1.setLinkCost(10.5);
27 BOOST_CHECK_CLOSE(adjacent1.getLinkCost(), 10.5, 0.0001);
28
29 BOOST_CHECK_EQUAL(adjacent1.getName(), "testname");
30
31}
32
33BOOST_AUTO_TEST_SUITE_END()
34
35} //namespace tests
36} //namespace nlsr