Search in sources :

Example 11 with GlobalConfigurationValidatorAsserter

use of com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter in project hub-alert by blackducksoftware.

the class SchedulingConfigurationValidatorTest method verifyValidConfiguration.

/*
     * daily processing hour: required, valid list option
     * purge data frequency: required, valid list option
     */
@Test
public void verifyValidConfiguration() {
    GlobalConfigurationValidatorAsserter validatorAsserter = createValidatorAsserter();
    validatorAsserter.assertValid();
}
Also used : GlobalConfigurationValidatorAsserter(com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter) Test(org.junit.jupiter.api.Test)

Example 12 with GlobalConfigurationValidatorAsserter

use of com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter in project hub-alert by blackducksoftware.

the class SchedulingConfigurationValidatorTest method missingDailyProcessing.

@Test
public void missingDailyProcessing() {
    GlobalConfigurationValidatorAsserter validatorAsserter = createValidatorAsserter();
    validatorAsserter.assertMissingValue(SchedulingDescriptor.KEY_DAILY_PROCESSOR_HOUR_OF_DAY);
}
Also used : GlobalConfigurationValidatorAsserter(com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter) Test(org.junit.jupiter.api.Test)

Example 13 with GlobalConfigurationValidatorAsserter

use of com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter in project hub-alert by blackducksoftware.

the class SchedulingConfigurationValidatorTest method missingPurgeFrequency.

@Test
public void missingPurgeFrequency() {
    GlobalConfigurationValidatorAsserter validatorAsserter = createValidatorAsserter();
    validatorAsserter.assertMissingValue(SchedulingDescriptor.KEY_PURGE_DATA_FREQUENCY_DAYS);
}
Also used : GlobalConfigurationValidatorAsserter(com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter) Test(org.junit.jupiter.api.Test)

Example 14 with GlobalConfigurationValidatorAsserter

use of com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter in project hub-alert by blackducksoftware.

the class EmailGlobalConfigurationFieldModelValidatorTest method verifyValidConfig.

/*
     * Email host: Required
     * Email from: Required
     *
     * Email user: Required if email auth is true
     * Email password: Required if email auth is true
     */
@Test
public void verifyValidConfig() {
    GlobalConfigurationValidatorAsserter globalConfigurationValidatorAsserter = new GlobalConfigurationValidatorAsserter(new EmailChannelKey().getUniversalKey(), new EmailGlobalConfigurationFieldModelValidator(), createDefaultKeyToValues());
    globalConfigurationValidatorAsserter.assertValid();
}
Also used : EmailChannelKey(com.synopsys.integration.alert.descriptor.api.EmailChannelKey) GlobalConfigurationValidatorAsserter(com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter) Test(org.junit.jupiter.api.Test)

Example 15 with GlobalConfigurationValidatorAsserter

use of com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter in project hub-alert by blackducksoftware.

the class JiraCloudGlobalConfigurationFieldModelValidatorTest method invalidUrl.

@Test
public void invalidUrl() {
    GlobalConfigurationValidatorAsserter globalConfigurationValidatorAsserter = createGlobalConfigurationValidatorAsserter();
    globalConfigurationValidatorAsserter.assertInvalidValue(JiraCloudDescriptor.KEY_JIRA_URL, "not_a_url");
}
Also used : GlobalConfigurationValidatorAsserter(com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter) Test(org.junit.jupiter.api.Test)

Aggregations

GlobalConfigurationValidatorAsserter (com.synopsys.integration.alert.test.common.channel.GlobalConfigurationValidatorAsserter)32 Test (org.junit.jupiter.api.Test)31 FieldValueModel (com.synopsys.integration.alert.common.rest.model.FieldValueModel)6 BlackDuckProviderKey (com.synopsys.integration.alert.descriptor.api.BlackDuckProviderKey)4 EmailChannelKey (com.synopsys.integration.alert.descriptor.api.EmailChannelKey)2 Gson (com.google.gson.Gson)1 AlertProperties (com.synopsys.integration.alert.common.AlertProperties)1 FilePersistenceUtil (com.synopsys.integration.alert.common.persistence.util.FilePersistenceUtil)1 AuthenticationDescriptorKey (com.synopsys.integration.alert.component.authentication.descriptor.AuthenticationDescriptorKey)1 MockAlertProperties (com.synopsys.integration.alert.test.common.MockAlertProperties)1