BUG-2825: import IPv6 test 82/35382/1
authorRobert Varga <robert.varga@pantheon.sk>
Thu, 25 Feb 2016 11:36:08 +0000 (12:36 +0100)
committerRobert Varga <robert.varga@pantheon.sk>
Thu, 25 Feb 2016 11:36:54 +0000 (12:36 +0100)
Imports the basic test from Ipv6UtilsTest.

Change-Id: I8f221b8172040fa053680ff8561552b88b16210c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java [new file with mode: 0644]

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 (file)
index 0000000..154f6cc
--- /dev/null
@@ -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);
+    }
+}