Search in sources :

Example 6 with NotificationContentComponent

use of com.synopsys.integration.blackduck.api.manual.component.NotificationContentComponent in project hub-alert by blackducksoftware.

the class JobNotificationFilterUtilsTest method doesNotificationApplyToJobDefaultTest.

@Test
public void doesNotificationApplyToJobDefaultTest() {
    NotificationContentComponent notificationContent = Mockito.mock(NotificationContentComponent.class);
    AlertNotificationModel notificationModel = createAlertNotificationModel(NotificationType.LICENSE_LIMIT);
    DetailedNotificationContent detailedNotificationContent = DetailedNotificationContent.projectless(notificationModel, notificationContent);
    FilteredDistributionJobResponseModel jobResponseModel = createFilteredDistributionJobResponseModel(List.of(NotificationType.LICENSE_LIMIT.name()), List.of(), List.of(), List.of(), false, "", "");
    assertTrue(JobNotificationFilterUtils.doesNotificationApplyToJob(jobResponseModel, detailedNotificationContent));
}
Also used : AlertNotificationModel(com.synopsys.integration.alert.common.rest.model.AlertNotificationModel) FilteredDistributionJobResponseModel(com.synopsys.integration.alert.common.persistence.model.job.FilteredDistributionJobResponseModel) NotificationContentComponent(com.synopsys.integration.blackduck.api.manual.component.NotificationContentComponent) DetailedNotificationContent(com.synopsys.integration.alert.processor.api.detail.DetailedNotificationContent) Test(org.junit.jupiter.api.Test)

Aggregations

FilteredDistributionJobResponseModel (com.synopsys.integration.alert.common.persistence.model.job.FilteredDistributionJobResponseModel)6 AlertNotificationModel (com.synopsys.integration.alert.common.rest.model.AlertNotificationModel)6 DetailedNotificationContent (com.synopsys.integration.alert.processor.api.detail.DetailedNotificationContent)6 NotificationContentComponent (com.synopsys.integration.blackduck.api.manual.component.NotificationContentComponent)6 Test (org.junit.jupiter.api.Test)5