Search in sources :

Example 1 with ProjectVersionNotificationDetailExtractor

use of com.synopsys.integration.alert.provider.blackduck.processor.detail.ProjectVersionNotificationDetailExtractor in project hub-alert by blackducksoftware.

the class NotificationDetailExtractionDelegatorTest method wrapNotificationTest.

@Test
public void wrapNotificationTest() {
    ProjectVersionNotificationDetailExtractor projectVersionNDE = new ProjectVersionNotificationDetailExtractor();
    NotificationDetailExtractionDelegator delegator = new NotificationDetailExtractionDelegator(RESPONSE_RESOLVER, List.of(projectVersionNDE));
    List<DetailedNotificationContent> detailedContent = delegator.wrapNotification(ALERT_NOTIFICATION_MODEL);
    assertEquals(1, detailedContent.size());
    ProjectVersionNotificationContent content = PVN_VIEW.getContent();
    DetailedNotificationContent detailedPVN = detailedContent.get(0);
    assertEquals(content.getProjectName(), detailedPVN.getProjectName().orElse(null));
}
Also used : ProjectVersionNotificationContent(com.synopsys.integration.blackduck.api.manual.component.ProjectVersionNotificationContent) ProjectVersionNotificationDetailExtractor(com.synopsys.integration.alert.provider.blackduck.processor.detail.ProjectVersionNotificationDetailExtractor) Test(org.junit.jupiter.api.Test)

Aggregations

ProjectVersionNotificationDetailExtractor (com.synopsys.integration.alert.provider.blackduck.processor.detail.ProjectVersionNotificationDetailExtractor)1 ProjectVersionNotificationContent (com.synopsys.integration.blackduck.api.manual.component.ProjectVersionNotificationContent)1 Test (org.junit.jupiter.api.Test)1