blob: 7c1fbb5004d2c43883b61a6eab814f3fa64ddfa0 [file] [log] [blame]
Sho SHIMIZUaf1dffc2015-09-04 15:56:07 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Sho SHIMIZUaf1dffc2015-09-04 15:56:07 -07003 *
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 */
Sho SHIMIZU3559c312015-11-04 14:59:31 -080016package org.onosproject.pcepio.types;
Sho SHIMIZUaf1dffc2015-09-04 15:56:07 -070017
18import com.google.common.testing.EqualsTester;
Sho SHIMIZU3559c312015-11-04 14:59:31 -080019import org.junit.Test;
Sho SHIMIZUaf1dffc2015-09-04 15:56:07 -070020
21public 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 };
28
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);
32
33 @Test
34 public void basics() {
35 new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
36 }
Sho SHIMIZU3559c312015-11-04 14:59:31 -080037}