d1798fa327d9d436c331301d3c9066589396601c
[onosfw.git] /
1 /*
2  * Copyright 2015 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  */
16 package org.onosproject.pcepio.types;
17
18 import com.google.common.testing.EqualsTester;
19 import org.junit.Test;
20
21 public class StatefulIPv4LspIdentidiersTlvTest {
22
23     private final int ipv4IngressAddress = 1;
24     private final short lspId = 1;
25     private final short tunnelId = 1;
26     private final int extendedTunnelId = 1;
27     private final int ipv4EgressAddress = 1;
28
29     private final StatefulIPv4LspIdentidiersTlv tlv1 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress, lspId,
30             tunnelId, extendedTunnelId, ipv4EgressAddress);
31
32     private final int ipv4IngressAddress1 = 1;
33     private final short lspId1 = 1;
34     private final short tunnelId1 = 1;
35     private final int extendedTunnelId1 = 1;
36     private final int ipv4EgressAddress1 = 1;
37
38     private final StatefulIPv4LspIdentidiersTlv tlv2 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress1, lspId1,
39             tunnelId1, extendedTunnelId1, ipv4EgressAddress1);
40
41     private final int ipv4IngressAddress2 = 2;
42     private final short lspId2 = 2;
43     private final short tunnelId2 = 2;
44     private final int extendedTunnelId2 = 2;
45     private final int ipv4EgressAddress2 = 2;
46
47     private final StatefulIPv4LspIdentidiersTlv tlv3 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress2, lspId2,
48             tunnelId2, extendedTunnelId2, ipv4EgressAddress2);
49
50     @Test
51     public void basics() {
52         new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
53
54     }
55 }