use of org.mule.runtime.config.internal.NotificationConfig.DisabledNotificationConfig in project mule by mulesoft.
the class ServerNotificationManagerConfiguratorTestCase method compliantDisabledNotificationByInterface.
@Test
public void compliantDisabledNotificationByInterface() throws InitialisationException {
doReturn(singletonList((NotificationsProvider) () -> singletonMap("test:COMPLIANT", new Pair(CompliantNotification.class, CompliantNotificationListener.class)))).when(registry).lookupAllByType(NotificationsProvider.class);
final DisabledNotificationConfig disableNotificationConfig = new DisabledNotificationConfig();
disableNotificationConfig.setInterfaceClass(CompliantNotificationListener.class);
configurator.setDisabledNotifications(singletonList(disableNotificationConfig));
configurator.initialise();
verify(notificationManager).disableInterface(CompliantNotificationListener.class);
}
use of org.mule.runtime.config.internal.NotificationConfig.DisabledNotificationConfig in project mule by mulesoft.
the class ServerNotificationManagerConfiguratorTestCase method compliantDisabledNotificationByEventClass.
@Test
public void compliantDisabledNotificationByEventClass() throws InitialisationException {
doReturn(singletonList((NotificationsProvider) () -> singletonMap("test:COMPLIANT", new Pair(CompliantNotification.class, CompliantNotificationListener.class)))).when(registry).lookupAllByType(NotificationsProvider.class);
final DisabledNotificationConfig disableNotificationConfig = new DisabledNotificationConfig();
disableNotificationConfig.setEventClass(CompliantNotification.class);
configurator.setDisabledNotifications(singletonList(disableNotificationConfig));
configurator.initialise();
verify(notificationManager).disableType(CompliantNotification.class);
}
use of org.mule.runtime.config.internal.NotificationConfig.DisabledNotificationConfig in project mule by mulesoft.
the class ServerNotificationManagerConfiguratorTestCase method compliantDisabledNotificationByEventName.
@Test
public void compliantDisabledNotificationByEventName() throws InitialisationException {
doReturn(singletonList((NotificationsProvider) () -> singletonMap("test:COMPLIANT", new Pair(CompliantNotification.class, CompliantNotificationListener.class)))).when(registry).lookupAllByType(NotificationsProvider.class);
final DisabledNotificationConfig disableNotificationConfig = new DisabledNotificationConfig();
disableNotificationConfig.setEventName("test:COMPLIANT");
configurator.setDisabledNotifications(singletonList(disableNotificationConfig));
configurator.initialise();
verify(notificationManager).disableType(CompliantNotification.class);
}
Aggregations