use of com.synopsys.integration.alert.processor.api.extract.model.ProviderDetails in project hub-alert by blackducksoftware.
the class ProjectMessageTest method combineMessageReasonsDontMatchTest.
@Test
public void combineMessageReasonsDontMatchTest() {
LinkableItem provider = new LinkableItem("Provider", "Provider Config Name");
ProviderDetails providerDetails = new ProviderDetails(1L, provider);
LinkableItem commonProject = new LinkableItem("Project", "Common Project");
ProjectOperation commonOperation = ProjectOperation.CREATE;
ProjectMessage projectMessage1 = ProjectMessage.projectStatusInfo(providerDetails, commonProject, commonOperation);
LinkableItem projectVersion = new LinkableItem("Project Version", "1.2.3");
ProjectMessage projectMessage2 = ProjectMessage.projectVersionStatusInfo(providerDetails, commonProject, projectVersion, commonOperation);
assertNotCombined(projectMessage1, projectMessage2);
}
use of com.synopsys.integration.alert.processor.api.extract.model.ProviderDetails in project hub-alert by blackducksoftware.
the class NotificationRemovalTest method createABatchOfNotifications.
private void createABatchOfNotifications(ConfigurationModel providerConfig, OffsetDateTime notificationCreationTime, boolean batchOfProcessedNotifications) {
int count = BATCH_SIZE;
List<AlertNotificationModel> notifications = new ArrayList<>(BATCH_SIZE);
ProviderDetails providerDetails = new ProviderDetails(providerConfig.getConfigurationId(), new LinkableItem("Black Duck", "bd-server", BLACKDUCK_PROVIDER_URL));
for (int index = 0; index < count; index++) {
RuleViolationNotificationView ruleViolationNotificationView = createRuleViolationNotificationView(PROJECT_NAME);
String notificationContentString = GSON.toJson(ruleViolationNotificationView);
notifications.add(createNotification(providerDetails, NotificationType.RULE_VIOLATION.name(), notificationContentString, notificationCreationTime, batchOfProcessedNotifications));
}
notifications = notificationAccessor.saveAllNotifications(notifications);
createAuditEntries(notifications);
}
Aggregations