Search in sources :

Example 1 with GlobalPullRequestConfig

use of com.cloudogu.scm.review.config.service.GlobalPullRequestConfig in project scm-review-plugin by scm-manager.

the class RepositoryLinkEnricherTest method mockGlobalConfig.

private void mockGlobalConfig(boolean disableRepoConfig) {
    GlobalPullRequestConfig globalConfig = new GlobalPullRequestConfig();
    globalConfig.setDisableRepositoryConfiguration(disableRepoConfig);
    when(configService.getGlobalPullRequestConfig()).thenReturn(globalConfig);
}
Also used : GlobalPullRequestConfig(com.cloudogu.scm.review.config.service.GlobalPullRequestConfig)

Example 2 with GlobalPullRequestConfig

use of com.cloudogu.scm.review.config.service.GlobalPullRequestConfig in project scm-review-plugin by scm-manager.

the class GlobalConfigResourceTest method init.

@BeforeEach
void init() {
    configResource = new GlobalConfigResource(configService, new GlobalConfigMapperImpl());
    dispatcher = new RestDispatcher();
    dispatcher.addSingletonResource(configResource);
    lenient().when(uriInfo.getBaseUri()).thenReturn(URI.create("localhost/scm/api"));
    lenient().when(configService.getGlobalPullRequestConfig()).thenReturn(new GlobalPullRequestConfig());
}
Also used : GlobalPullRequestConfig(com.cloudogu.scm.review.config.service.GlobalPullRequestConfig) RestDispatcher(sonia.scm.web.RestDispatcher) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

GlobalPullRequestConfig (com.cloudogu.scm.review.config.service.GlobalPullRequestConfig)2 BeforeEach (org.junit.jupiter.api.BeforeEach)1 RestDispatcher (sonia.scm.web.RestDispatcher)1