Search in sources :

Example 1 with NotificationManager

use of org.opennms.netmgt.config.NotificationManager in project opennms by OpenNMS.

the class NotificationsConfigTest method testFormattedNotificationsXml.

@Test
public void testFormattedNotificationsXml() throws Exception {
    MockUtil.println("################# Running Test ################");
    MockLogAppender.setupLogging();
    MockNotifdConfigManager notifdConfig = new MockNotifdConfigManager(ConfigurationTestUtils.getConfigForResourceWithReplacements(this, "notifd-configuration.xml"));
    NotificationManager manager = new MockNotificationManager(notifdConfig, null, ConfigurationTestUtils.getConfigForResourceWithReplacements(this, "notifications-config-test.xml"));
    Notification n = manager.getNotification("crazyTestNotification");
    assertTrue(n.getTextMessage().contains("\n"));
}
Also used : MockNotificationManager(org.opennms.netmgt.config.mock.MockNotificationManager) MockNotifdConfigManager(org.opennms.netmgt.config.mock.MockNotifdConfigManager) NotificationManager(org.opennms.netmgt.config.NotificationManager) MockNotificationManager(org.opennms.netmgt.config.mock.MockNotificationManager) Notification(org.opennms.netmgt.config.notifications.Notification) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NotificationManager (org.opennms.netmgt.config.NotificationManager)1 MockNotifdConfigManager (org.opennms.netmgt.config.mock.MockNotifdConfigManager)1 MockNotificationManager (org.opennms.netmgt.config.mock.MockNotificationManager)1 Notification (org.opennms.netmgt.config.notifications.Notification)1