Search in sources :

Example 1 with JenkinsConfigurationServiceImpl

use of net.nemerosa.ontrack.extension.jenkins.JenkinsConfigurationServiceImpl 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);
}
Also used : JenkinsClient(net.nemerosa.ontrack.extension.jenkins.client.JenkinsClient) SecurityService(net.nemerosa.ontrack.model.security.SecurityService) EncryptionService(net.nemerosa.ontrack.model.security.EncryptionService) JenkinsConfigurationServiceImpl(net.nemerosa.ontrack.extension.jenkins.JenkinsConfigurationServiceImpl) JenkinsClientFactory(net.nemerosa.ontrack.extension.jenkins.client.JenkinsClientFactory) ConfigurationRepository(net.nemerosa.ontrack.model.support.ConfigurationRepository) OntrackConfigProperties(net.nemerosa.ontrack.model.support.OntrackConfigProperties) JenkinsConfiguration(net.nemerosa.ontrack.extension.jenkins.JenkinsConfiguration) Before(org.junit.Before)

Aggregations

JenkinsConfiguration (net.nemerosa.ontrack.extension.jenkins.JenkinsConfiguration)1 JenkinsConfigurationServiceImpl (net.nemerosa.ontrack.extension.jenkins.JenkinsConfigurationServiceImpl)1 JenkinsClient (net.nemerosa.ontrack.extension.jenkins.client.JenkinsClient)1 JenkinsClientFactory (net.nemerosa.ontrack.extension.jenkins.client.JenkinsClientFactory)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