summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
index ff6ed3dde..0a0eff03b 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
@@ -19,6 +19,10 @@ package io.fd.honeycomb.v3po.translate.v3po.interfacesstate;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Tap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VhostUser;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanTunnel;
public class InterfaceUtilsTest {
@@ -37,4 +41,12 @@ public class InterfaceUtilsTest {
public void testVppPhysAddrToYangInvalidByteArrayLength() throws Exception {
InterfaceUtils.vppPhysAddrToYang(new byte[]{1, 2, 3, 4, 5});
}
+
+ @Test
+ public void testGetInterfaceType() {
+ assertEquals(Tap.class, InterfaceUtils.getInterfaceType("tap0"));
+ assertEquals(VxlanTunnel.class, InterfaceUtils.getInterfaceType("vxlan0"));
+ assertEquals(VhostUser.class, InterfaceUtils.getInterfaceType("VirtualEthernet0/0/0"));
+ assertEquals(EthernetCsmacd.class, InterfaceUtils.getInterfaceType("local0"));
+ }
} \ No newline at end of file