use of com.synopsys.integration.alert.common.AlertProperties in project hub-alert by blackducksoftware.
the class SamlManagerTest method init.
@BeforeEach
public void init() throws Exception {
gson = new Gson();
context = Mockito.mock(SAMLContext.class);
parserPool = Mockito.mock(ParserPool.class);
extendedMetadata = Mockito.mock(ExtendedMetadata.class);
metadataManager = new CachingMetadataManager(Collections.emptyList());
metadataManager.setKeyManager(new EmptyKeyManager());
metadataGenerator = Mockito.mock(MetadataGenerator.class);
currentConfiguration = Mockito.mock(ConfigurationModel.class);
alertProperties = Mockito.mock(AlertProperties.class);
Mockito.when(alertProperties.getAlertSecretsDir()).thenReturn("./testDB/run/secrets");
filePersistenceUtil = new FilePersistenceUtil(alertProperties, gson);
}
use of com.synopsys.integration.alert.common.AlertProperties in project hub-alert by blackducksoftware.
the class AuthenticationConfigurationValidatorTest method createValidatorAsserter.
private GlobalConfigurationValidatorAsserter createValidatorAsserter(Map<String, FieldValueModel> keyToValues) {
AlertProperties mockAlertProperties = new MockAlertProperties();
FilePersistenceUtil filePersistenceUtil = new FilePersistenceUtil(mockAlertProperties, new Gson());
return new GlobalConfigurationValidatorAsserter(new AuthenticationDescriptorKey().getUniversalKey(), new AuthenticationConfigurationFieldModelValidator(filePersistenceUtil), keyToValues);
}
use of com.synopsys.integration.alert.common.AlertProperties in project hub-alert by blackducksoftware.
the class JobNotificationProcessorTest method createNotificationExtractorBlackDuckServicesFactoryCache.
private NotificationExtractorBlackDuckServicesFactoryCache createNotificationExtractorBlackDuckServicesFactoryCache() {
ConfigurationModelConfigurationAccessor configurationModelConfigurationAccessor = Mockito.mock(ConfigurationModelConfigurationAccessor.class);
AlertProperties properties = new AlertProperties();
ProxyManager proxyManager = Mockito.mock(ProxyManager.class);
BlackDuckPropertiesFactory blackDuckPropertiesFactory = new BlackDuckPropertiesFactory(configurationModelConfigurationAccessor, GSON, properties, proxyManager);
return new NotificationExtractorBlackDuckServicesFactoryCache(blackDuckPropertiesFactory);
}
use of com.synopsys.integration.alert.common.AlertProperties in project hub-alert by blackducksoftware.
the class DefaultConfigurationModelConfigurationAccessorTest method createEncryptionUtility.
private EncryptionUtility createEncryptionUtility() {
alertProperties = Mockito.mock(AlertProperties.class);
Mockito.when(alertProperties.getAlertEncryptionPassword()).thenReturn(Optional.of(TEST_PASSWORD));
Mockito.when(alertProperties.getAlertEncryptionGlobalSalt()).thenReturn(Optional.of(TEST_SALT));
Mockito.when(alertProperties.getAlertConfigHome()).thenReturn(TEST_DIRECTORY);
Mockito.when(alertProperties.getAlertSecretsDir()).thenReturn(TEST_SECRETS_DIRECTORY);
filePersistenceUtil = new FilePersistenceUtil(alertProperties, new Gson());
return new EncryptionUtility(alertProperties, filePersistenceUtil);
}
use of com.synopsys.integration.alert.common.AlertProperties in project hub-alert by blackducksoftware.
the class EncryptionUtilityTest method initializeTest.
@BeforeEach
public void initializeTest() {
alertProperties = Mockito.mock(AlertProperties.class);
Mockito.when(alertProperties.getAlertEncryptionPassword()).thenReturn(Optional.of(TEST_PASSWORD));
Mockito.when(alertProperties.getAlertEncryptionGlobalSalt()).thenReturn(Optional.of(TEST_SALT));
Mockito.when(alertProperties.getAlertConfigHome()).thenReturn(TEST_DIRECTORY);
Mockito.when(alertProperties.getAlertSecretsDir()).thenReturn(TEST_SECRETS_DIRECTORY);
filePersistenceUtil = new FilePersistenceUtil(alertProperties, new Gson());
encryptionUtility = new EncryptionUtility(alertProperties, filePersistenceUtil);
File file = new File(TEST_DIRECTORY, "data");
file.mkdirs();
}
Aggregations