use of com.synopsys.integration.alert.descriptor.api.AzureBoardsChannelKey in project hub-alert by blackducksoftware.
the class StaticJobAccessorTestIT method verifyAzureSavesTest.
@Test
@Transactional
public void verifyAzureSavesTest() {
AzureBoardsJobDetailsModel azureBoardsJobDetailsModel = new AzureBoardsJobDetailsModel(UUID.randomUUID(), true, "projectNameOrId", "workItemType", "workItemCompletedState", "workItemReopenState");
DistributionJobRequestModel jobRequestModel = createJobRequestModel(azureBoardsJobDetailsModel, new AzureBoardsChannelKey());
createAndAssertJob(jobRequestModel);
}
use of com.synopsys.integration.alert.descriptor.api.AzureBoardsChannelKey in project hub-alert by blackducksoftware.
the class AzureBoardsGlobalConfigurationFieldModelValidatorTest method oauthRequestIsRunningError.
@Test
public void oauthRequestIsRunningError() {
OAuthRequestValidator oAuthRequestValidator = new OAuthRequestValidator();
oAuthRequestValidator.addAuthorizationRequest("test");
AzureBoardsGlobalConfigurationFieldModelValidator azureBoardsGlobalConfigurationValidator = new AzureBoardsGlobalConfigurationFieldModelValidator(oAuthRequestValidator);
Set<AlertFieldStatus> fieldStatuses = azureBoardsGlobalConfigurationValidator.validate(new FieldModel(new AzureBoardsChannelKey().getUniversalKey(), ConfigContextEnum.GLOBAL.name(), createValidKeyToValues()));
assertEquals(1, fieldStatuses.size());
AlertFieldStatus alertFieldStatus = fieldStatuses.stream().findFirst().orElse(null);
assertNotNull(alertFieldStatus);
assertEquals(AzureBoardsDescriptor.KEY_OAUTH, alertFieldStatus.getFieldName());
}
Aggregations