Search in sources :

Example 1 with JIRASessionFactory

use of net.nemerosa.ontrack.extension.jira.tx.JIRASessionFactory in project ontrack by nemerosa.

the class JIRAServiceTest method before.

@Before
public void before() {
    SecurityService securityService = mock(SecurityService.class);
    configurationRepository = mock(ConfigurationRepository.class);
    encryptionService = mock(EncryptionService.class);
    JIRASession jiraSession = mock(JIRASession.class);
    when(jiraSession.getClient()).thenReturn(mock(JIRAClient.class));
    JIRASessionFactory jiraSessionFactory = mock(JIRASessionFactory.class);
    when(jiraSessionFactory.create(any(JIRAConfiguration.class))).thenReturn(jiraSession);
    OntrackConfigProperties ontrackConfigProperties = new OntrackConfigProperties();
    jiraService = new JIRAConfigurationServiceImpl(configurationRepository, securityService, encryptionService, mock(EventPostService.class), mock(EventFactory.class), jiraSessionFactory, ontrackConfigProperties);
}
Also used : JIRAClient(net.nemerosa.ontrack.extension.jira.client.JIRAClient) JIRASession(net.nemerosa.ontrack.extension.jira.tx.JIRASession) SecurityService(net.nemerosa.ontrack.model.security.SecurityService) EncryptionService(net.nemerosa.ontrack.model.security.EncryptionService) ConfigurationRepository(net.nemerosa.ontrack.model.support.ConfigurationRepository) JIRASessionFactory(net.nemerosa.ontrack.extension.jira.tx.JIRASessionFactory) OntrackConfigProperties(net.nemerosa.ontrack.model.support.OntrackConfigProperties) Before(org.junit.Before)

Aggregations

JIRAClient (net.nemerosa.ontrack.extension.jira.client.JIRAClient)1 JIRASession (net.nemerosa.ontrack.extension.jira.tx.JIRASession)1 JIRASessionFactory (net.nemerosa.ontrack.extension.jira.tx.JIRASessionFactory)1 EncryptionService (net.nemerosa.ontrack.model.security.EncryptionService)1 SecurityService (net.nemerosa.ontrack.model.security.SecurityService)1 ConfigurationRepository (net.nemerosa.ontrack.model.support.ConfigurationRepository)1 OntrackConfigProperties (net.nemerosa.ontrack.model.support.OntrackConfigProperties)1 Before (org.junit.Before)1