use of net.nemerosa.ontrack.model.security.EncryptionService in project ontrack by nemerosa.
the class ConfigurationServiceTest method before.
@Before
public void before() {
configurationRepository = mock(ConfigurationRepository.class);
securityService = mock(SecurityService.class);
encryptionService = mock(EncryptionService.class);
eventPostService = mock(EventPostService.class);
eventFactory = mock(EventFactory.class);
OntrackConfigProperties ontrackConfigProperties = new OntrackConfigProperties();
configurationService = new TestConfigurationServiceImpl(configurationRepository, securityService, encryptionService, eventPostService, eventFactory, ontrackConfigProperties);
}
use of net.nemerosa.ontrack.model.security.EncryptionService in project ontrack by nemerosa.
the class JenkinsServiceTest method before.
@Before
public void before() {
SecurityService securityService = mock(SecurityService.class);
configurationRepository = mock(ConfigurationRepository.class);
encryptionService = mock(EncryptionService.class);
JenkinsClientFactory jenkinsClientFactory = mock(JenkinsClientFactory.class);
JenkinsClient okJenkinsClient = mock(JenkinsClient.class);
when(jenkinsClientFactory.getClient(any(JenkinsConfiguration.class))).thenReturn(okJenkinsClient);
OntrackConfigProperties ontrackConfigProperties = new OntrackConfigProperties();
jenkinsService = new JenkinsConfigurationServiceImpl(configurationRepository, securityService, encryptionService, mock(EventPostService.class), mock(EventFactory.class), jenkinsClientFactory, ontrackConfigProperties);
}
use of net.nemerosa.ontrack.model.security.EncryptionService 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