From 9aff753e8a81c6c30987785a89a464dc449fb216 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 25 Feb 2016 12:36:08 +0100 Subject: [PATCH] BUG-2825: import IPv6 test Imports the basic test from Ipv6UtilsTest. Change-Id: I8f221b8172040fa053680ff8561552b88b16210c Signed-off-by: Robert Varga (cherry picked from commit bbf8a37147f6303bb4626ca209624dc96042b91e) --- .../mdsal/model/ietf/util/Ipv6UtilsTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java diff --git a/model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java b/model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java new file mode 100644 index 0000000000..154f6cc83f --- /dev/null +++ b/model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014 Brocade Communications Systems Inc and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.mdsal.model.ietf.util; + +import org.junit.Assert; +import org.junit.Test; + +/** + * @author Anton Ivanov aivanov@brocade.com + */ +public class Ipv6UtilsTest { + /* + * Test canonicalBinaryV6Address + */ + @Test + public void canonicalBinaryV6AddressTest() { + byte [] ipv6binary = Ipv6Utils.canonicalBinaryV6Address("0000:0000:0000:0000:0000:0000:0000:0001"); + byte [] expected = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1}; + + Assert.assertArrayEquals(expected, ipv6binary); + } +} -- 2.36.6