summaryrefslogtreecommitdiffstats
path: root/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java')
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
index 3d289c7e7..fb4c61b55 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
@@ -16,14 +16,16 @@
package io.fd.hc2vpp.common.translate.util;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix;
-import static org.junit.Assert.*;
-
public class Ipv6TranslatorTest implements Ipv6Translator {
private static final byte[] IPV6_BYTES = {32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1};
@@ -61,8 +63,13 @@ public class Ipv6TranslatorTest implements Ipv6Translator {
}
@Test
- public void testArrayToIpv6Prefix() throws Exception {
- assertEquals(IPV6_COMPRESSED + "/64", arrayToIpv6Prefix(IPV6_BYTES, (byte) 64).getValue());
+ public void testArrayToIpv6Prefix64() throws Exception {
+ assertEquals(IPV6_COMPRESSED + "/64", arrayToIpv6Prefix(IPV6_BYTES, 64).getValue());
+ }
+
+ @Test
+ public void testArrayToIpv6Prefix128() throws Exception {
+ assertEquals(IPV6_COMPRESSED + "/128", arrayToIpv6Prefix(IPV6_BYTES, 128).getValue());
}
@Test