use of com.blackducksoftware.integration.test.TestLogger in project hub-alert by blackducksoftware.
the class NotificationItemProcessorTest method testProcessEvents.
@Test
public void testProcessEvents() throws HubIntegrationException {
final GlobalProperties globalProperties = new TestGlobalProperties();
final NotificationEvent event1 = new NotificationEvent("event 1", NotificationCategoryEnum.HIGH_VULNERABILITY, null);
final NotificationEvent event2 = new NotificationEvent("event 2", NotificationCategoryEnum.LOW_VULNERABILITY, null);
final List<NotificationEvent> eventList = Arrays.asList(event1, event2);
final NotificationItemProcessor notificationItemProcessor = new NotificationItemProcessor(globalProperties, new TestLogger());
final DBStoreEvent storeEvent = notificationItemProcessor.processEvents(eventList);
assertEquals("DB_STORE_EVENT", storeEvent.getTopic());
assertTrue(storeEvent.getNotificationList().size() == 2);
}
Aggregations