blob: 53b3d2c1b8f9dbc96f5e572ac6ca33c8da27400d [file] [log] [blame]
Sho SHIMIZUe3cc0b92014-11-20 16:18:29 -08001/*
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 */
16package org.onlab.onos.core;
17
18import com.google.common.testing.EqualsTester;
19import org.junit.Test;
20
21/**
22 * Test for DefaultGroupId.
23 */
24public class DefaultGroupIdTest {
25
26 /**
27 * Tests the equality of the instances.
28 */
29 @Test
30 public void testEquality() {
31 DefaultGroupId id1 = new DefaultGroupId((short) 1);
32 DefaultGroupId id2 = new DefaultGroupId((short) 1);
33 DefaultGroupId id3 = new DefaultGroupId((short) 2);
34
35 new EqualsTester()
36 .addEqualityGroup(id1, id2)
37 .addEqualityGroup(id3)
38 .testEquals();
39 }
40
41}