2 * Copyright 2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.pcepio;
18 import org.junit.Test;
19 import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4;
21 import com.google.common.testing.EqualsTester;
23 public class PcepNaiUnnumberedAdjacencyIpv4Test {
25 private final int localNodeId1 = 1;
26 private final int localInterfaceId1 = 1;
27 private final int remoteNodeId1 = 1;
28 private final int remoteInterfaceId1 = 1;
29 private final PcepNaiUnnumberedAdjacencyIpv4 tlv1 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId1,
30 localInterfaceId1, remoteNodeId1, remoteInterfaceId1);
32 private final int localNodeId2 = 1;
33 private final int localInterfaceId2 = 1;
34 private final int remoteNodeId2 = 1;
35 private final int remoteInterfaceId2 = 1;
36 private final PcepNaiUnnumberedAdjacencyIpv4 tlv2 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId2,
37 localInterfaceId2, remoteNodeId2, remoteInterfaceId2);
39 private final int localNodeId3 = 2;
40 private final int localInterfaceId3 = 2;
41 private final int remoteNodeId3 = 2;
42 private final int remoteInterfaceId3 = 2;
44 private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3,
45 localInterfaceId3, remoteNodeId3, remoteInterfaceId3);
48 public void basics() {
49 new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();