diff options
author | Tibor Král <tibor.kral@pantheon.tech> | 2019-05-14 12:19:44 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-05-27 08:25:05 +0200 |
commit | 5c416ebacf4baad25de6213661c3cdfff31c0482 (patch) | |
tree | d2fe4889f01e4adbdeb50ea83b47aa44102a5f49 /v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java | |
parent | 83206cb1b6b0a6a3bbe45d646ed69a5f2b587fed (diff) |
HC2VPP-381: Validation support for V3PO module
Change-Id: If288d97dce15bcc6924d4dd65c640a20920f094d
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java index 18ec6614d..f7befc4e9 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java @@ -29,7 +29,6 @@ import io.fd.jvpp.core.dto.HwInterfaceSetMtuReply; import org.junit.Test; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190502.VppInterfaceAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190502.interfaces._interface.Ethernet; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190502.interfaces._interface.EthernetBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev180703.EthernetCsmacd; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface; @@ -57,7 +56,7 @@ public class EthernetCustomizerTest extends WriterCustomizerTest { public void testWrite() throws WriteFailedException { when(api.hwInterfaceSetMtu(any())).thenReturn(future(new HwInterfaceSetMtuReply())); final int mtu = 1234; - customizer.writeCurrentAttributes(IF_IID, ethernet(mtu), writeContext); + customizer.writeCurrentAttributes(IF_IID, EthernetValidatorTest.ethernet(mtu), writeContext); verify(api).hwInterfaceSetMtu(mtuSetRequest(mtu)); } @@ -65,7 +64,7 @@ public class EthernetCustomizerTest extends WriterCustomizerTest { public void testUpdate() throws WriteFailedException { when(api.hwInterfaceSetMtu(any())).thenReturn(future(new HwInterfaceSetMtuReply())); final int mtu = 5678; - customizer.updateCurrentAttributes(IF_IID, mock(Ethernet.class), ethernet(mtu), writeContext); + customizer.updateCurrentAttributes(IF_IID, mock(Ethernet.class), EthernetValidatorTest.ethernet(mtu), writeContext); verify(api).hwInterfaceSetMtu(mtuSetRequest(mtu)); } @@ -80,11 +79,4 @@ public class EthernetCustomizerTest extends WriterCustomizerTest { public void testDelete() throws WriteFailedException { customizer.deleteCurrentAttributes(IF_IID, mock(Ethernet.class), writeContext); } - - private static Ethernet ethernet(final int mtu) { - final EthernetBuilder ethernet = new EthernetBuilder(); - ethernet.setMtu(mtu); - return ethernet.build(); - } - } |