Merge remote-tracking branch 'origin/master'

# Conflicts:
#	stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunnerFactory.groovy
This commit is contained in:
Mariusz Smykula
2016-04-12 12:54:58 +02:00
2 changed files with 11 additions and 6 deletions

View File

@@ -13,14 +13,22 @@ class BatchStubRunnerFactory {
private final StubRunnerOptions stubRunnerOptions
private final Collection<StubConfiguration> dependencies
private final StubDownloader stubDownloader
BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection<StubConfiguration> dependencies) {
this(stubRunnerOptions, dependencies, new GrapeStubDownloader())
}
BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions,
Collection<StubConfiguration> dependencies,
StubDownloader stubDownloader) {
this.stubRunnerOptions = stubRunnerOptions
this.dependencies = dependencies
this.stubDownloader = stubDownloader
}
BatchStubRunner buildBatchStubRunner() {
StubRunnerFactory stubRunnerFactory = new StubRunnerFactory(stubRunnerOptions, dependencies)
StubRunnerFactory stubRunnerFactory = new StubRunnerFactory(stubRunnerOptions, dependencies, stubDownloader)
return new BatchStubRunner(stubRunnerFactory.createStubsFromServiceConfiguration())
}

View File

@@ -16,11 +16,8 @@ class StubRunnerFactory {
private final Collection<StubConfiguration> collaborators
private final StubDownloader stubDownloader
StubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection<StubConfiguration> collaborators) {
this(stubRunnerOptions, collaborators, new GrapeStubDownloader())
}
StubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection<StubConfiguration> collaborators,
StubRunnerFactory(StubRunnerOptions stubRunnerOptions,
Collection<StubConfiguration> collaborators,
StubDownloader stubDownloader) {
this.stubRunnerOptions = stubRunnerOptions
this.collaborators = collaborators