From a4f9e9186c7399360c8abe9cabe0e0d110f22138 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Fri, 10 Jun 2016 15:56:09 +0200 Subject: Enable checkstyle Change-Id: Icb7ba90e26294b227d0bd393183ba33d99c2660b Signed-off-by: Maros Marsalek --- .../v3po/interfaces/SubInterfaceCustomizerTest.java | 17 +++-------------- .../v3po/interfaces/VxlanGpeCustomizerTest.java | 13 +++++++------ 2 files changed, 10 insertions(+), 20 deletions(-) (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb') diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizerTest.java index 5ed37aa40..7161218a0 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizerTest.java @@ -19,6 +19,7 @@ package io.fd.honeycomb.v3po.translate.v3po.interfaces; import static io.fd.honeycomb.v3po.translate.v3po.test.ContextTestUtils.getMapping; import static io.fd.honeycomb.v3po.translate.v3po.test.ContextTestUtils.getMappingIid; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; @@ -67,24 +68,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.tags.TagKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.VppBaseCallException; -import org.openvpp.jvpp.VppInvocationException; import org.openvpp.jvpp.dto.CreateSubif; import org.openvpp.jvpp.dto.CreateSubifReply; import org.openvpp.jvpp.dto.SwInterfaceSetFlags; import org.openvpp.jvpp.dto.SwInterfaceSetFlagsReply; import org.openvpp.jvpp.future.FutureJVpp; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; - public class SubInterfaceCustomizerTest { @Mock @@ -186,7 +175,7 @@ public class SubInterfaceCustomizerTest { private void whenCreateSubifFailedThen(final int retval) throws ExecutionException, InterruptedException, VppBaseCallException { doReturn(TestHelperUtils.createFutureException(retval)).when(api).createSubif(any(CreateSubif.class)); } - + private void whenSwInterfaceSetFlagsThen(final int retval) throws ExecutionException, InterruptedException, VppBaseCallException { final CompletableFuture replyFuture = new CompletableFuture<>(); final SwInterfaceSetFlagsReply reply = new SwInterfaceSetFlagsReply(); @@ -201,7 +190,7 @@ public class SubInterfaceCustomizerTest { private void whenCreateSubifThenFailure() throws ExecutionException, InterruptedException, VppBaseCallException { whenCreateSubifFailedThen(-1); } - + private void whenSwInterfaceSetFlagsThenSuccess() throws ExecutionException, InterruptedException, VppBaseCallException { whenSwInterfaceSetFlagsThen(0); } diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanGpeCustomizerTest.java index 77404aa45..2ad831f9f 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanGpeCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanGpeCustomizerTest.java @@ -19,7 +19,10 @@ package io.fd.honeycomb.v3po.translate.v3po.interfaces; import static io.fd.honeycomb.v3po.translate.v3po.test.ContextTestUtils.getMapping; import static io.fd.honeycomb.v3po.translate.v3po.test.ContextTestUtils.getMappingIid; import static java.util.Collections.singletonList; -import static org.junit.Assert.*; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doReturn; @@ -53,14 +56,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces. import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanGpeVni; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanGpeNextProtocol; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanGpeVni; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpeBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.VppBaseCallException; -import org.openvpp.jvpp.VppInvocationException; -import org.openvpp.jvpp.dto.VxlanAddDelTunnel; import org.openvpp.jvpp.dto.VxlanAddDelTunnelReply; import org.openvpp.jvpp.dto.VxlanGpeAddDelTunnel; import org.openvpp.jvpp.dto.VxlanGpeAddDelTunnelReply; @@ -134,7 +135,7 @@ public class VxlanGpeCustomizerTest { assertEquals(vxlanGpe.getVni().getValue().intValue(), actual.vni); assertEquals(vxlanGpe.getNextProtocol().getIntValue(), actual.protocol); assertEquals(vxlanGpe.getEncapVrfId().intValue(), actual.encapVrfId); - assertEquals(vxlanGpe.getDecapVrfId().intValue(), actual.decapVrfId); + assertEquals(vxlanGpe.getDecapVrfId().intValue(), actual.decapVrfId); return actual; } private void verifyVxlanGpeAddWasInvoked(final VxlanGpe vxlanGpe) throws VppBaseCallException{ @@ -154,7 +155,7 @@ public class VxlanGpeCustomizerTest { builder.setVni(new VxlanGpeVni(Long.valueOf(vni))); builder.setNextProtocol(VxlanGpeNextProtocol.forValue(1)); builder.setEncapVrfId(Long.valueOf(123)); - builder.setDecapVrfId(Long.valueOf(456)); + builder.setDecapVrfId(Long.valueOf(456)); return builder.build(); } -- cgit 1.2.3-korg