Search in sources :

Example 6 with IssueTrackerException

use of com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException in project hub-alert by blackducksoftware.

the class JiraCloudPropertiesTest method testBuildConfig.

@Test
public void testBuildConfig() {
    try {
        String url = "http://localhost:2990";
        String token = "token";
        String user = "user";
        boolean pluginCheckDisabled = true;
        JiraCloudProperties properties = new JiraCloudProperties(url, token, user, pluginCheckDisabled, ProxyInfo.NO_PROXY_INFO);
        assertEquals(url, properties.getUrl());
        assertEquals(token, properties.getAccessToken());
        assertEquals(user, properties.getUsername());
        assertEquals(pluginCheckDisabled, properties.isPluginCheckDisabled());
        JiraCloudRestConfig config = properties.createJiraServerConfig();
        assertNotNull(config);
    } catch (IssueTrackerException ex) {
        ex.printStackTrace();
        fail();
    }
}
Also used : IssueTrackerException(com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException) JiraCloudRestConfig(com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig) Test(org.junit.jupiter.api.Test)

Example 7 with IssueTrackerException

use of com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException in project hub-alert by blackducksoftware.

the class JiraCloudPropertiesTest method testServerServiceFactory.

@Test
public void testServerServiceFactory() {
    try {
        JiraCloudProperties properties = new JiraCloudProperties("http://localhost:2990", "token", "user", false, ProxyInfo.NO_PROXY_INFO);
        JiraCloudServiceFactory serviceFactory = properties.createJiraServicesCloudFactory(LoggerFactory.getLogger(getClass()), new Gson());
        assertNotNull(serviceFactory);
    } catch (IssueTrackerException ex) {
        ex.printStackTrace();
        fail();
    }
}
Also used : IssueTrackerException(com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException) JiraCloudServiceFactory(com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory) Gson(com.google.gson.Gson) Test(org.junit.jupiter.api.Test)

Aggregations

IssueTrackerException (com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException)7 Test (org.junit.jupiter.api.Test)5 Gson (com.google.gson.Gson)2 JiraServerGlobalConfigModel (com.synopsys.integration.alert.channel.jira.server.model.JiraServerGlobalConfigModel)1 JiraServerGlobalConfigurationValidator (com.synopsys.integration.alert.channel.jira.server.validator.JiraServerGlobalConfigurationValidator)1 ConfigurationTestResult (com.synopsys.integration.alert.common.message.model.ConfigurationTestResult)1 AuthorizationManager (com.synopsys.integration.alert.common.security.authorization.AuthorizationManager)1 JiraCloudRestConfig (com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig)1 JiraCloudRestConfigBuilder (com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfigBuilder)1 JiraCloudServiceFactory (com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory)1 JiraServerRestConfig (com.synopsys.integration.jira.common.server.configuration.JiraServerRestConfig)1 JiraServerRestConfigBuilder (com.synopsys.integration.jira.common.server.configuration.JiraServerRestConfigBuilder)1 JiraServerServiceFactory (com.synopsys.integration.jira.common.server.service.JiraServerServiceFactory)1