tom | 747a213 | 2014-10-02 08:18:41 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.topology; |
| 2 | |
| 3 | import com.google.common.testing.EqualsTester; |
| 4 | import org.junit.Test; |
| 5 | import org.onlab.onos.net.DeviceId; |
| 6 | |
| 7 | import static org.junit.Assert.*; |
| 8 | import static org.onlab.onos.net.DeviceId.deviceId; |
| 9 | |
| 10 | /** |
| 11 | * Tests of the topology graph vertex. |
| 12 | */ |
| 13 | public 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 | } |
Yuta HIGUCHI | 885be1d | 2014-10-04 21:47:26 -0700 | [diff] [blame^] | 29 | } |