/** * <p> * After the mule context is built it has to contain the proper notification interfaces in the notification manager * </p> */ @Test public void notificationManagerContainsTheCorrectInterfaces() { DefaultMuleContextBuilder builder = new DefaultMuleContextBuilder(APP); builder.setMuleConfiguration(new MyMuleConfiguration()); builder.setLifecycleManager(new MyLifeCycleManager()); MuleContext muleContext = builder.buildMuleContext(); Map<Class<? extends NotificationListener>, Set<Class<? extends Notification>>> interfaces = muleContext.getNotificationManager().getInterfaceToTypes(); assertEquals(MuleContextNotification.class, interfaces.get(MuleContextNotificationListener.class).toArray()[0]); assertEquals(RoutingNotification.class, interfaces.get(RoutingNotificationListener.class).toArray()[0]); assertEquals(SecurityNotification.class, interfaces.get(SecurityNotificationListener.class).toArray()[0]); assertEquals(ManagementNotification.class, interfaces.get(ManagementNotificationListener.class).toArray()[0]); assertEquals(CustomNotification.class, interfaces.get(CustomNotificationListener.class).toArray()[0]); assertEquals(ConnectionNotification.class, interfaces.get(ConnectionNotificationListener.class).toArray()[0]); assertEquals(ExceptionNotification.class, interfaces.get(ExceptionNotificationListener.class).toArray()[0]); assertEquals(TransactionNotification.class, interfaces.get(TransactionNotificationListener.class).toArray()[0]); assertEquals(PipelineMessageNotification.class, interfaces.get(PipelineMessageNotificationListener.class).toArray()[0]); assertEquals(AsyncMessageNotification.class, interfaces.get(AsyncMessageNotificationListener.class).toArray()[0]); assertEquals(ClusterNodeNotification.class, interfaces.get(ClusterNodeNotificationListener.class).toArray()[0]); }
/** * <p> * After the mule context is built it has to contain the proper notification interfaces in the notification manager * </p> */ @Test public void notificationManagerContainsTheCorrectInterfaces() { DefaultMuleContextBuilder builder = new DefaultMuleContextBuilder(APP); builder.setMuleConfiguration(new MyMuleConfiguration()); builder.setLifecycleManager(new MyLifeCycleManager()); MuleContext muleContext = builder.buildMuleContext(); Map<Class<? extends NotificationListener>, Set<Class<? extends Notification>>> interfaces = muleContext.getNotificationManager().getInterfaceToTypes(); assertEquals(MuleContextNotification.class, interfaces.get(MuleContextNotificationListener.class).toArray()[0]); assertEquals(RoutingNotification.class, interfaces.get(RoutingNotificationListener.class).toArray()[0]); assertEquals(SecurityNotification.class, interfaces.get(SecurityNotificationListener.class).toArray()[0]); assertEquals(ManagementNotification.class, interfaces.get(ManagementNotificationListener.class).toArray()[0]); assertEquals(CustomNotification.class, interfaces.get(CustomNotificationListener.class).toArray()[0]); assertEquals(ConnectionNotification.class, interfaces.get(ConnectionNotificationListener.class).toArray()[0]); assertEquals(ExceptionNotification.class, interfaces.get(ExceptionNotificationListener.class).toArray()[0]); assertEquals(TransactionNotification.class, interfaces.get(TransactionNotificationListener.class).toArray()[0]); assertEquals(PipelineMessageNotification.class, interfaces.get(PipelineMessageNotificationListener.class).toArray()[0]); assertEquals(AsyncMessageNotification.class, interfaces.get(AsyncMessageNotificationListener.class).toArray()[0]); assertEquals(ClusterNodeNotification.class, interfaces.get(ClusterNodeNotificationListener.class).toArray()[0]); }