Search in sources :

Example 1 with JiraServerRestConfig

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

the class JiraServerPropertiesTest method testBuildConfig.

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

Example 2 with JiraServerRestConfig

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

the class JiraServerProperties method createJiraServicesServerFactory.

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

Aggregations

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