blob: 53f8d1e1d21e02baef82535bf1cb038bffff93a0 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
tomde8d9682014-08-27 01:11:43 -070016package org.onlab.onos.net;
17
18import com.google.common.testing.EqualsTester;
19import org.junit.Test;
20
tomca20e0c2014-09-03 23:22:24 -070021import static org.onlab.onos.net.DeviceId.deviceId;
22
tomde8d9682014-08-27 01:11:43 -070023/**
tomca20e0c2014-09-03 23:22:24 -070024 * Test of the device identifier.
tomde8d9682014-08-27 01:11:43 -070025 */
tom545708e2014-10-09 17:10:02 -070026public class DeviceIdTest {
tomde8d9682014-08-27 01:11:43 -070027
28 @Test
29 public void basics() {
30 new EqualsTester()
tomca20e0c2014-09-03 23:22:24 -070031 .addEqualityGroup(deviceId("of:foo"),
32 deviceId("of:foo"))
33 .addEqualityGroup(deviceId("of:bar"))
tomde8d9682014-08-27 01:11:43 -070034 .testEquals();
35 }
36
37}