diff --git a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/BatchStubRunnerFactory.groovy b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/BatchStubRunnerFactory.groovy index 18652eb767..99b01dcfc0 100644 --- a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/BatchStubRunnerFactory.groovy +++ b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/BatchStubRunnerFactory.groovy @@ -13,14 +13,22 @@ class BatchStubRunnerFactory { private final StubRunnerOptions stubRunnerOptions private final Collection dependencies + private final StubDownloader stubDownloader BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection dependencies) { + this(stubRunnerOptions, dependencies, new GrapeStubDownloader()) + } + + BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, + Collection 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()) } diff --git a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunnerFactory.groovy b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunnerFactory.groovy index 501acb20f6..d06ae1f190 100644 --- a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunnerFactory.groovy +++ b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunnerFactory.groovy @@ -16,11 +16,8 @@ class StubRunnerFactory { private final Collection collaborators private final StubDownloader stubDownloader - StubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection collaborators) { - this(stubRunnerOptions, collaborators, new GrapeStubDownloader()) - } - - StubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection collaborators, + StubRunnerFactory(StubRunnerOptions stubRunnerOptions, + Collection collaborators, StubDownloader stubDownloader) { this.stubRunnerOptions = stubRunnerOptions this.collaborators = collaborators