use of com.thoughtworks.go.config.ServerConfig in project gocd by gocd.
the class CachedCommandSnippetsTest method setupAFakeCommandRepoLocation.
private void setupAFakeCommandRepoLocation(final String location, final String... otherLocations) {
CruiseConfig cruiseConfig = mock(BasicCruiseConfig.class);
ServerConfig serverConfig = mock(ServerConfig.class);
when(systemEnvironment.get(COMMAND_REPOSITORY_DIRECTORY)).thenReturn("some-directory");
when(goConfigService.currentCruiseConfig()).thenReturn(cruiseConfig);
when(cruiseConfig.server()).thenReturn(serverConfig);
when(serverConfig.getCommandRepositoryLocation()).thenReturn(location, otherLocations);
}
Aggregations