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);
}
Aggregations