summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-09-18 15:17:02 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-09-20 15:55:04 +0000
commit7a7a31ae0a390113399119835bdaa3a4ed694170 (patch)
treeea5c6bbf21f5d1829d4d6698dc50cc5f48bc096e /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java
parent27eba3a20b98378a07178722606752960978ea5a (diff)
HONEYCOMB-116: refactor v3po tests to use CTU.mockMapping
Change-Id: I72d3a545d66e1280e34beff72adcdf876dae86fd Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java
index f7e1038d5..a65050a82 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/VxlanCustomizerTest.java
@@ -50,9 +50,13 @@ import org.openvpp.jvpp.core.dto.VxlanTunnelDump;
public class VxlanCustomizerTest extends ReaderCustomizerTest<Vxlan, VxlanBuilder> {
+ private static final String IFC_CTX_NAME = "ifc-test-instance";
+ private static final String IF_NAME = "ifc1";
+ private static final int IF_INDEX = 0;
+
private NamingContext interfacesContext;
static final InstanceIdentifier<Vxlan> IID =
- InstanceIdentifier.create(InterfacesState.class).child(Interface.class, new InterfaceKey("ifc1"))
+ InstanceIdentifier.create(InterfacesState.class).child(Interface.class, new InterfaceKey(IF_NAME))
.augmentation(VppInterfaceStateAugmentation.class).child(Vxlan.class);
public VxlanCustomizerTest() {
@@ -61,9 +65,8 @@ public class VxlanCustomizerTest extends ReaderCustomizerTest<Vxlan, VxlanBuilde
@Override
public void setUpBefore() {
- interfacesContext = new NamingContext("vxlan-tunnel", "test-instance");
- doReturn(ContextTestUtils.getMapping("ifc1", 0)).when(mappingContext).read(
- ContextTestUtils.getMappingIid("ifc1", "test-instance"));
+ interfacesContext = new NamingContext("vxlan-tunnel", IFC_CTX_NAME);
+ ContextTestUtils.mockMapping(mappingContext, IF_NAME, IF_INDEX, IFC_CTX_NAME);
final SwInterfaceDetails v = new SwInterfaceDetails();
v.interfaceName = "vxlan-tunnel4".getBytes();