Search in sources :

Example 1 with ServerNotificationManagerConfigurator

use of org.mule.runtime.config.internal.ServerNotificationManagerConfigurator in project mule by mulesoft.

the class ServerNotificationManagerConfiguratorTestCase method before.

@Before
public void before() {
    registry = mock(Registry.class);
    notificationManager = mock(ServerNotificationManager.class);
    context = mock(MuleContext.class);
    doReturn(notificationManager).when(context).getNotificationManager();
    configurator = new ServerNotificationManagerConfigurator();
    configurator.setMuleContext(context);
    configurator.setRegistry(registry);
    final ApplicationContext springContext = mock(ApplicationContext.class);
    doReturn(new String[0]).when(springContext).getBeanNamesForType(NotificationListener.class, false, true);
    configurator.setApplicationContext(springContext);
}
Also used : MuleContext(org.mule.runtime.core.api.MuleContext) ApplicationContext(org.springframework.context.ApplicationContext) Registry(org.mule.runtime.api.artifact.Registry) ServerNotificationManager(org.mule.runtime.core.api.context.notification.ServerNotificationManager) ServerNotificationManagerConfigurator(org.mule.runtime.config.internal.ServerNotificationManagerConfigurator) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 Registry (org.mule.runtime.api.artifact.Registry)1 ServerNotificationManagerConfigurator (org.mule.runtime.config.internal.ServerNotificationManagerConfigurator)1 MuleContext (org.mule.runtime.core.api.MuleContext)1 ServerNotificationManager (org.mule.runtime.core.api.context.notification.ServerNotificationManager)1 ApplicationContext (org.springframework.context.ApplicationContext)1