blob: d45bae8bcfe975fe556cbeaa93ea8ea4ad01d773 [file] [log] [blame]
Sho SHIMIZUaf1dffc2015-09-04 15:56:07 -07001/*
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 */
16package org.onosproject.pcepio;
17
18import org.junit.Test;
19import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4;
20
21import com.google.common.testing.EqualsTester;
22
23public class PcepNaiUnnumberedAdjacencyIpv4Test {
24
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);
31
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);
38
39 private final int localNodeId3 = 2;
40 private final int localInterfaceId3 = 2;
41 private final int remoteNodeId3 = 2;
42 private final int remoteInterfaceId3 = 2;
43
44 private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3,
45 localInterfaceId3, remoteNodeId3, remoteInterfaceId3);
46
47 @Test
48 public void basics() {
49 new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
50 }
51}