Search in sources :

Example 21 with TestProperties

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

the class EmailPerformanceTest method initTest.

@BeforeAll
public static void initTest() {
    EMAIL_CHANNEL_KEY = ChannelKeys.EMAIL.getUniversalKey();
    TestProperties testProperties = new TestProperties();
    EMAIL_SMTP_HOST = testProperties.getProperty(TestPropertyKey.TEST_EMAIL_SMTP_HOST);
    EMAIL_SMTP_FROM = testProperties.getProperty(TestPropertyKey.TEST_EMAIL_SMTP_FROM);
    EMAIL_RECIPIENT = testProperties.getProperty(TestPropertyKey.TEST_EMAIL_RECIPIENT);
}
Also used : TestProperties(com.synopsys.integration.alert.test.common.TestProperties) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 22 with TestProperties

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

the class JiraCloudPerformanceTest method jiraCloudJobTest.

@Test
@Disabled
public void jiraCloudJobTest() throws Exception {
    TestProperties testProperties = new TestProperties();
    FieldModel globalConfig = createGlobalConfig(testProperties);
    // Install plugin
    ActionResponse<String> actionResponse = jiraCloudCustomFunctionAction.createActionResponse(globalConfig, null);
    if (actionResponse.isError()) {
        fail("Unable to install the Alert plugin for Jira Cloud. Exiting test...");
    }
    Map<String, FieldValueModel> channelFieldsMap = createChannelFieldsMap(testProperties);
    IntegrationPerformanceTestRunner testRunner = createTestRunner();
    testRunner.runTest(globalConfig, channelFieldsMap, JIRA_CLOUD_PERFORMANCE_JOB_NAME);
}
Also used : TestProperties(com.synopsys.integration.alert.test.common.TestProperties) IntegrationPerformanceTestRunner(com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner) FieldModel(com.synopsys.integration.alert.common.rest.model.FieldModel) FieldValueModel(com.synopsys.integration.alert.common.rest.model.FieldValueModel) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Disabled(org.junit.jupiter.api.Disabled)

Example 23 with TestProperties

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

the class MsTeamsPerformanceTest method initTest.

@BeforeAll
public static void initTest() {
    TestProperties testProperties = new TestProperties();
    MSTEAMS_CHANNEL_WEBHOOK = testProperties.getProperty(TestPropertyKey.TEST_MSTEAMS_WEBHOOK);
}
Also used : TestProperties(com.synopsys.integration.alert.test.common.TestProperties) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 24 with TestProperties

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

the class ComponentUnknownVersionNotificationSerializationTest method initTest.

@BeforeAll
public static void initTest() {
    TestProperties testProperties = new TestProperties();
    SLACK_CHANNEL_WEBHOOK = testProperties.getProperty(TestPropertyKey.TEST_SLACK_WEBHOOK);
    SLACK_CHANNEL_NAME = testProperties.getProperty(TestPropertyKey.TEST_SLACK_CHANNEL_NAME);
    SLACK_CHANNEL_USERNAME = testProperties.getProperty(TestPropertyKey.TEST_SLACK_USERNAME);
}
Also used : TestProperties(com.synopsys.integration.alert.test.common.TestProperties) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

TestProperties (com.synopsys.integration.alert.test.common.TestProperties)24 Test (org.junit.jupiter.api.Test)10 Gson (com.google.gson.Gson)6 EmailChannelMessagingService (com.synopsys.integration.alert.channel.email.distribution.EmailChannelMessagingService)5 JavamailPropertiesFactory (com.synopsys.integration.alert.service.email.JavamailPropertiesFactory)5 BeforeAll (org.junit.jupiter.api.BeforeAll)5 BeforeEach (org.junit.jupiter.api.BeforeEach)5 EmailGlobalConfigurationValidator (com.synopsys.integration.alert.channel.email.validator.EmailGlobalConfigurationValidator)4 ConfigurationFieldModel (com.synopsys.integration.alert.common.persistence.model.ConfigurationFieldModel)4 AuthorizationManager (com.synopsys.integration.alert.common.security.authorization.AuthorizationManager)4 EmailGlobalConfigModel (com.synopsys.integration.alert.service.email.model.EmailGlobalConfigModel)4 TestTags (com.synopsys.integration.alert.test.common.TestTags)4 Tags (org.junit.jupiter.api.Tags)4 ConfigurationModel (com.synopsys.integration.alert.common.persistence.model.ConfigurationModel)3 FieldModel (com.synopsys.integration.alert.common.rest.model.FieldModel)3 GsonBuilder (com.google.gson.GsonBuilder)2 IssueTrackerCallbackInfoCreator (com.synopsys.integration.alert.api.channel.issue.callback.IssueTrackerCallbackInfoCreator)2 IssueCategoryRetriever (com.synopsys.integration.alert.api.channel.issue.search.IssueCategoryRetriever)2 ConfigurationTestResult (com.synopsys.integration.alert.common.message.model.ConfigurationTestResult)2 MessageResult (com.synopsys.integration.alert.common.message.model.MessageResult)2