use of net.nemerosa.ontrack.extension.jenkins.client.JenkinsClientFactory 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);
}
Aggregations