diff options
author | 2016-04-29 09:14:32 +0200 | |
---|---|---|
committer | 2016-04-29 09:54:40 +0200 | |
commit | 4f849ffc9479c71011ca5690a2d8f98228c0a0a7 (patch) | |
tree | b68467ebc63b9efc25070b0be883d57bbb5a1494 /v3po/v3po2vpp/src/test/java | |
parent | 3f026ee223703973735acac6983ac456426b0d01 (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')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/utils/V3poUtilsTest.java | 35 |
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 |