5d7c02fc9d3f7ad72ef660ae3c61e33fc81e5308
[onosfw.git] /
1 package org.onosproject.incubator.net.resource.label;
2
3 import org.junit.Test;
4 import org.onosproject.event.AbstractEventTest;
5
6 import com.google.common.testing.EqualsTester;
7
8 /**
9  * Tests of default label resource.
10  */
11 public class DefaultLabelResourceTest extends AbstractEventTest {
12
13     @Test
14     public void testEquality() {
15         String deviceId1 = "of:001";
16         String deviceId2 = "of:002";
17         long labelResourceId1 = 100;
18         long labelResourceId2 = 200;
19         DefaultLabelResource h1 = new DefaultLabelResource(deviceId1,
20                                                            labelResourceId1);
21         DefaultLabelResource h2 = new DefaultLabelResource(deviceId1,
22                                                            labelResourceId1);
23         DefaultLabelResource h3 = new DefaultLabelResource(deviceId2,
24                                                            labelResourceId2);
25         DefaultLabelResource h4 = new DefaultLabelResource(deviceId2,
26                                                            labelResourceId2);
27
28         new EqualsTester().addEqualityGroup(h1, h2).addEqualityGroup(h3, h4)
29                 .testEquals();
30     }
31 }