blob: 1284624e38e59977a25490b386d48899df6c969f [file] [log] [blame]
tom747a2132014-10-02 08:18:41 -07001package org.onlab.onos.net.topology;
2
3import com.google.common.testing.EqualsTester;
4import org.junit.Test;
5import org.onlab.onos.net.DeviceId;
6
7import static org.junit.Assert.*;
8import static org.onlab.onos.net.DeviceId.deviceId;
9
10/**
11 * Tests of the topology graph vertex.
12 */
13public class DefaultTopologyVertexTest {
14
15 private static final DeviceId D1 = deviceId("1");
16 private static final DeviceId D2 = deviceId("2");
17
18 @Test
19 public void basics() {
20 DefaultTopologyVertex v = new DefaultTopologyVertex(D1);
21 assertEquals("incorrect device id", D1, v.deviceId());
22
23 new EqualsTester()
24 .addEqualityGroup(new DefaultTopologyVertex(D1),
25 new DefaultTopologyVertex(D1))
26 .addEqualityGroup(new DefaultTopologyVertex(D2),
27 new DefaultTopologyVertex(D2)).testEquals();
28 }
29
30}