Sho SHIMIZU | af1dffc | 2015-09-04 15:56:07 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.pcepio; |
| 17 | |
| 18 | import org.junit.Test; |
| 19 | import org.onosproject.pcepio.types.PcepNaiIpv6Adjacency; |
| 20 | |
| 21 | import com.google.common.testing.EqualsTester; |
| 22 | |
| 23 | public class PcepNaiIpv6AdjacencyTest { |
| 24 | private final byte[] localIpv6Addr1 = {(byte) 0x01010101 }; |
| 25 | private final byte[] remoteIpv6Addr1 = {(byte) 0x02020202 }; |
| 26 | private final byte[] localIpv6Addr2 = {(byte) 0x01010101 }; |
| 27 | private final byte[] remoteIpv6Addr2 = {(byte) 0x02020202 }; |
| 28 | private final byte[] localIpv6Addr3 = {(byte) 0x05050505 }; |
| 29 | private final byte[] remoteIpv6Addr3 = {(byte) 0x06060606 }; |
| 30 | |
| 31 | private final PcepNaiIpv6Adjacency tlv1 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); |
| 32 | private final PcepNaiIpv6Adjacency tlv2 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); |
| 33 | private final PcepNaiIpv6Adjacency tlv3 = PcepNaiIpv6Adjacency.of(localIpv6Addr3, remoteIpv6Addr3); |
| 34 | |
| 35 | @Test |
| 36 | public void basics() { |
| 37 | new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); |
| 38 | } |
bharat saraswal | e2e7a00 | 2015-08-21 22:47:30 +0530 | [diff] [blame] | 39 | } |