summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-04-29 09:14:32 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-04-29 09:54:40 +0200
commit439f0735bc1292df57a5a9938486326d5a01f18c (patch)
tree6ddf65994c9add0cbfc525c9afe06cec63f0a76a /v3po/v3po2vpp/src/test/java/io
parentc97a65be83eb391395d30396523ffe14163486f7 (diff)
Fix compilation problems caused by vxlan_add_del_tunnel definition change in vpe.api
Change-Id: I6599598cb9755f263a603df484710e210867e068 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/utils/V3poUtilsTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/utils/V3poUtilsTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/utils/V3poUtilsTest.java
new file mode 100644
index 000000000..3cb054ad4
--- /dev/null
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/utils/V3poUtilsTest.java
@@ -0,0 +1,35 @@
+package io.fd.honeycomb.v3po.translate.v3po.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
+
+public class V3poUtilsTest {
+
+ @Test
+ public void testRemoveIpv4AddressNoZoneFromIpv4WithZone() throws Exception {
+ String ipWithZone = "1.2.3.4%20";
+ String ipNoZone = "1.2.3.4";
+ final Ipv4Address expectedIp = new Ipv4Address(ipNoZone);
+ final Ipv4AddressNoZone actualIp = V3poUtils.removeIpv4AddressNoZone(new Ipv4Address(ipWithZone));
+ assertEquals(expectedIp.getValue(), actualIp.getValue());
+ }
+
+ @Test
+ public void testRemoveIpv4AddressNoZoneFromIpv4WithoutZone() throws Exception {
+ String ipNoZone = "1.2.3.4";
+ final Ipv4Address expectedIp = new Ipv4Address(ipNoZone);
+ final Ipv4AddressNoZone actualIp = V3poUtils.removeIpv4AddressNoZone(expectedIp);
+ assertEquals(expectedIp.getValue(), actualIp.getValue());
+ }
+
+ @Test
+ public void testRemoveIpv4AddressNoZoneNop() throws Exception {
+ String ipNoZone = "1.2.3.4";
+ final Ipv4Address expectedIp = new Ipv4AddressNoZone(ipNoZone);
+ final Ipv4AddressNoZone actualIp = V3poUtils.removeIpv4AddressNoZone(expectedIp);
+ assertEquals(expectedIp, actualIp);
+ }
+} \ No newline at end of file