summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java
diff options
context:
space:
mode:
authorMatej Perina <mperina@cisco.com>2017-09-13 12:48:27 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-10-11 07:56:55 +0000
commit50ffd9e741d96d23952d2c61e0650157ca8d364a (patch)
tree87bf65830de89ec76744acaf8e3b6e917e70bf41 /v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java
parent4e9fe17852628fc2f839801f39fada24f34896ff (diff)
Adapt notification producer to jvpp API changes (VPP-914)
Required by https://gerrit.fd.io/r/#/c/8377/ Change-Id: I91b5adda6ec8d9b011ebc1287fd2ec9811164b04 Signed-off-by: Matej Perina <mperina@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java
index 7605d42ac..6a946cb6d 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java
@@ -27,12 +27,12 @@ import io.fd.hc2vpp.common.test.util.NamingContextHelper;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.notification.NotificationCollector;
import io.fd.honeycomb.translate.MappingContext;
-import io.fd.vpp.jvpp.core.callback.SwInterfaceEventNotificationCallback;
-import io.fd.vpp.jvpp.core.dto.SwInterfaceEventNotification;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceEventCallback;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEvent;
import io.fd.vpp.jvpp.core.dto.WantInterfaceEvents;
import io.fd.vpp.jvpp.core.dto.WantInterfaceEventsReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import io.fd.vpp.jvpp.core.notification.CoreNotificationRegistry;
+import io.fd.vpp.jvpp.core.notification.CoreEventRegistry;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -55,18 +55,18 @@ public class InterfaceChangeNotificationProducerTest implements FutureProducer,
@Mock
private NotificationCollector collector;
@Mock
- private CoreNotificationRegistry notificationRegistry;
+ private CoreEventRegistry notificationRegistry;
@Mock
private AutoCloseable notificationListenerReg;
- private ArgumentCaptor<SwInterfaceEventNotificationCallback> callbackArgumentCaptor;
+ private ArgumentCaptor<SwInterfaceEventCallback> callbackArgumentCaptor;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
- doReturn(notificationRegistry).when(jVpp).getNotificationRegistry();
- callbackArgumentCaptor = ArgumentCaptor.forClass(SwInterfaceEventNotificationCallback.class);
- doReturn(notificationListenerReg).when(notificationRegistry).registerSwInterfaceEventNotificationCallback(
+ doReturn(notificationRegistry).when(jVpp).getEventRegistry();
+ callbackArgumentCaptor = ArgumentCaptor.forClass(SwInterfaceEventCallback.class);
+ doReturn(notificationListenerReg).when(notificationRegistry).registerSwInterfaceEventCallback(
callbackArgumentCaptor.capture());
defineMapping(mappingContext, IFACE_NAME, IFACE_ID, IFC_CTX_NAME);
doReturn(future(new WantInterfaceEventsReply())).when(jVpp).wantInterfaceEvents(any(WantInterfaceEvents.class));
@@ -79,9 +79,9 @@ public class InterfaceChangeNotificationProducerTest implements FutureProducer,
interfaceChangeNotificationProducer.start(collector);
verify(jVpp).wantInterfaceEvents(any(WantInterfaceEvents.class));
- verify(jVpp).getNotificationRegistry();
- verify(notificationRegistry).registerSwInterfaceEventNotificationCallback(any(
- SwInterfaceEventNotificationCallback.class));
+ verify(jVpp).getEventRegistry();
+ verify(notificationRegistry).registerSwInterfaceEventCallback(any(
+ SwInterfaceEventCallback.class));
interfaceChangeNotificationProducer.stop();
verify(jVpp, times(2)).wantInterfaceEvents(any(WantInterfaceEvents.class));
@@ -95,12 +95,12 @@ public class InterfaceChangeNotificationProducerTest implements FutureProducer,
interfaceChangeNotificationProducer.start(collector);
- final SwInterfaceEventNotification swInterfaceSetFlagsNotification = new SwInterfaceEventNotification();
+ final SwInterfaceEvent swInterfaceSetFlagsNotification = new SwInterfaceEvent();
swInterfaceSetFlagsNotification.deleted = 0;
swInterfaceSetFlagsNotification.swIfIndex = IFACE_ID;
swInterfaceSetFlagsNotification.adminUpDown = 1;
swInterfaceSetFlagsNotification.linkUpDown = 1;
- callbackArgumentCaptor.getValue().onSwInterfaceEventNotification(swInterfaceSetFlagsNotification);
+ callbackArgumentCaptor.getValue().onSwInterfaceEvent(swInterfaceSetFlagsNotification);
final ArgumentCaptor<InterfaceStateChange> notificationCaptor =
ArgumentCaptor.forClass(InterfaceStateChange.class);
verify(collector).onNotification(notificationCaptor.capture());