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 PcepNaiIpv6AdjacencyTest {
22 private final byte[] localIpv6Addr1 = {(byte) 0x01010101 };
23 private final byte[] remoteIpv6Addr1 = {(byte) 0x02020202 };
24 private final byte[] localIpv6Addr2 = {(byte) 0x01010101 };
25 private final byte[] remoteIpv6Addr2 = {(byte) 0x02020202 };
26 private final byte[] localIpv6Addr3 = {(byte) 0x05050505 };
27 private final byte[] remoteIpv6Addr3 = {(byte) 0x06060606 };
29 private final PcepNaiIpv6Adjacency tlv1 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1);
30 private final PcepNaiIpv6Adjacency tlv2 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1);
31 private final PcepNaiIpv6Adjacency tlv3 = PcepNaiIpv6Adjacency.of(localIpv6Addr3, remoteIpv6Addr3);
34 public void basics() {
35 new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();