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.types;
18 import com.google.common.testing.EqualsTester;
19 import org.junit.Test;
21 public class PcepNaiUnnumberedAdjacencyIpv4Test {
23 private final int localNodeId1 = 1;
24 private final int localInterfaceId1 = 1;
25 private final int remoteNodeId1 = 1;
26 private final int remoteInterfaceId1 = 1;
27 private final PcepNaiUnnumberedAdjacencyIpv4 tlv1 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId1,
28 localInterfaceId1, remoteNodeId1, remoteInterfaceId1);
30 private final int localNodeId2 = 1;
31 private final int localInterfaceId2 = 1;
32 private final int remoteNodeId2 = 1;
33 private final int remoteInterfaceId2 = 1;
34 private final PcepNaiUnnumberedAdjacencyIpv4 tlv2 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId2,
35 localInterfaceId2, remoteNodeId2, remoteInterfaceId2);
37 private final int localNodeId3 = 2;
38 private final int localInterfaceId3 = 2;
39 private final int remoteNodeId3 = 2;
40 private final int remoteInterfaceId3 = 2;
42 private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3,
43 localInterfaceId3, remoteNodeId3, remoteInterfaceId3);
46 public void basics() {
47 new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();