Search in sources :

Example 1 with GitRepositoryClientFactory

use of net.nemerosa.ontrack.git.GitRepositoryClientFactory in project ontrack by nemerosa.

the class GitMockConfig method repositoryClientFactory.

@Bean
@Primary
public GitRepositoryClientFactory repositoryClientFactory() {
    GitRepositoryClientFactory factory = mock(GitRepositoryClientFactory.class);
    when(factory.getClient(any(GitRepository.class))).thenReturn(testGitRepositoryClient());
    return factory;
}
Also used : GitRepository(net.nemerosa.ontrack.git.GitRepository) GitRepositoryClientFactory(net.nemerosa.ontrack.git.GitRepositoryClientFactory) Primary(org.springframework.context.annotation.Primary) Bean(org.springframework.context.annotation.Bean)

Aggregations

GitRepository (net.nemerosa.ontrack.git.GitRepository)1 GitRepositoryClientFactory (net.nemerosa.ontrack.git.GitRepositoryClientFactory)1 Bean (org.springframework.context.annotation.Bean)1 Primary (org.springframework.context.annotation.Primary)1