BUG-2825: import IPv6 test
[mdsal.git] / model / ietf / ietf-type-util / src / test / java / org / opendaylight / mdsal / model / ietf / util / Ipv6UtilsTest.java
1 /*
2  * Copyright (c) 2014 Brocade Communications Systems Inc and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.model.ietf.util;
9
10 import org.junit.Assert;
11 import org.junit.Test;
12
13 /**
14  * @author Anton Ivanov aivanov@brocade.com
15  */
16 public class Ipv6UtilsTest {
17     /*
18      * Test canonicalBinaryV6Address
19      */
20     @Test
21     public void canonicalBinaryV6AddressTest() {
22         byte [] ipv6binary = Ipv6Utils.canonicalBinaryV6Address("0000:0000:0000:0000:0000:0000:0000:0001");
23         byte [] expected = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1};
24
25         Assert.assertArrayEquals(expected, ipv6binary);
26     }
27 }