From 7ad1eb51710b65fdad35fab04122de4eb887e541 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 23 Sep 2016 09:06:19 +0200 Subject: HONEYCOMB-116: utility for stubbing MappingContext methods - introduces MappingContextHelper (refactored ContextTestUtils) - updates all v3po and lisp unit tests to use MCH - updates lisp tests to mock EidMappingContext Change-Id: I73b1adda767db71388ca1c4d7206cfd7ee9c70e1 Signed-off-by: Marek Gradzki --- .../v3po/notification/InterfaceChangeNotificationProducerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducerTest.java') diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducerTest.java index a227602b4..96acb9979 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducerTest.java @@ -23,7 +23,7 @@ import static org.mockito.Mockito.verify; import io.fd.honeycomb.notification.NotificationCollector; import io.fd.honeycomb.translate.MappingContext; -import io.fd.honeycomb.translate.v3po.test.ContextTestUtils; +import io.fd.honeycomb.vpp.test.util.NamingContextHelper; import io.fd.honeycomb.translate.v3po.util.NamingContext; import io.fd.honeycomb.vpp.test.util.FutureProducer; import org.junit.Before; @@ -40,7 +40,7 @@ import org.openvpp.jvpp.core.dto.WantInterfaceEventsReply; import org.openvpp.jvpp.core.future.FutureJVppCore; import org.openvpp.jvpp.core.notification.CoreNotificationRegistry; -public class InterfaceChangeNotificationProducerTest implements FutureProducer { +public class InterfaceChangeNotificationProducerTest implements FutureProducer, NamingContextHelper { private static final String IFC_CTX_NAME = "ifc-test-instance"; private static final String IFACE_NAME = "eth0"; @@ -67,7 +67,7 @@ public class InterfaceChangeNotificationProducerTest implements FutureProducer { callbackArgumentCaptor = ArgumentCaptor.forClass(SwInterfaceSetFlagsNotificationCallback.class); doReturn(notificationListenerReg).when(notificationRegistry).registerSwInterfaceSetFlagsNotificationCallback( callbackArgumentCaptor.capture()); - ContextTestUtils.mockMapping(mappingContext, IFACE_NAME, IFACE_ID, IFC_CTX_NAME); + defineMapping(mappingContext, IFACE_NAME, IFACE_ID, IFC_CTX_NAME); doReturn(future(new WantInterfaceEventsReply())).when(jVpp).wantInterfaceEvents(any(WantInterfaceEvents.class)); } -- cgit 1.2.3-korg