summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-09-22 10:12:29 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-22 10:14:24 +0200
commitea4d1f9960997c62e3cd3172355ef8a862dc8a11 (patch)
tree8fd1d8947be79462e1df16a60070d961baab9278 /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
parent36ccb3599811a096840e03e4c2113f9f8cfed620 (diff)
Honeycomb-185: remove argumentCaptor from BDCustomizer and IfcCustomizerTests
Change-Id: Ic1f541c3c2d90c3ec4074bfe5c5a73d3cc6c4a49 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
index 86c1df2fd..5a6376a63 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
@@ -16,7 +16,6 @@
package io.fd.honeycomb.translate.v3po.interfacesstate;
-import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.doReturn;
@@ -36,7 +35,6 @@ import java.util.Collections;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
-import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
@@ -91,12 +89,10 @@ public class InterfaceCustomizerTest extends
private void verifySwInterfaceDumpWasInvoked(final int nameFilterValid, final String ifaceName,
final int dumpIfcsInvocationCount)
throws VppInvocationException {
- // TODO HONEYCOMB-185 adding equals methods for jvpp DTOs would make ArgumentCaptor usage obsolete
- ArgumentCaptor<SwInterfaceDump> argumentCaptor = ArgumentCaptor.forClass(SwInterfaceDump.class);
- verify(api, times(dumpIfcsInvocationCount)).swInterfaceDump(argumentCaptor.capture());
- final SwInterfaceDump actual = argumentCaptor.getValue();
- assertEquals(nameFilterValid, actual.nameFilterValid);
- assertArrayEquals(ifaceName.getBytes(), actual.nameFilter);
+ final SwInterfaceDump expected = new SwInterfaceDump();
+ expected.nameFilterValid = (byte)nameFilterValid;
+ expected.nameFilter = ifaceName.getBytes();
+ verify(api, times(dumpIfcsInvocationCount)).swInterfaceDump(expected);
}
private static void assertIfacesAreEqual(final Interface iface, final SwInterfaceDetails details) {