Search in sources :

Example 1 with JiraCloudRestConfig

use of com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig 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 2 with JiraCloudRestConfig

use of com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig in project hub-alert by blackducksoftware.

the class JiraCloudProperties method createJiraServicesCloudFactory.

public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException {
    JiraCloudRestConfig jiraServerConfig = createJiraServerConfig();
    Slf4jIntLogger intLogger = new Slf4jIntLogger(logger);
    JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogger);
    return new JiraCloudServiceFactory(intLogger, jiraHttpClient, gson);
}
Also used : JiraHttpClient(com.synopsys.integration.jira.common.rest.JiraHttpClient) Slf4jIntLogger(com.synopsys.integration.log.Slf4jIntLogger) JiraCloudRestConfig(com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig) JiraCloudServiceFactory(com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory)

Aggregations

JiraCloudRestConfig (com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig)2 IssueTrackerException (com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueTrackerException)1 JiraCloudServiceFactory (com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory)1 JiraHttpClient (com.synopsys.integration.jira.common.rest.JiraHttpClient)1 Slf4jIntLogger (com.synopsys.integration.log.Slf4jIntLogger)1 Test (org.junit.jupiter.api.Test)1