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 b57b1c37ad..a7e3412fa9 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 @@ -27,6 +27,12 @@ class BatchStubRunnerFactory { this(stubRunnerOptions, dependencies, new GrapeStubDownloader(), accurestMessaging) } + BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, + Collection dependencies, + StubDownloader stubDownloader) { + this(stubRunnerOptions, dependencies, new GrapeStubDownloader(), new NoOpAccurestMessaging()) + } + BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, Collection dependencies, StubDownloader stubDownloader, diff --git a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunner.groovy b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunner.groovy index 839b12c401..69d4940c4f 100644 --- a/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunner.groovy +++ b/stub-runner/stub-runner/src/main/groovy/io/codearte/accurest/stubrunner/StubRunner.groovy @@ -25,17 +25,15 @@ class StubRunner implements StubRunning { @Deprecated StubRunner(Arguments arguments) { - this.stubsConfiguration = arguments.stub - this.stubRunnerOptions = arguments.stubRunnerOptions - this.stubRepository = new StubRepository(new File(arguments.repositoryPath)) - AvailablePortScanner portScanner = new AvailablePortScanner(stubRunnerOptions.minPortValue, - stubRunnerOptions.maxPortValue) - this.accurestMessaging = new NoOpAccurestMessaging() - this.localStubRunner = new StubRunnerExecutor(portScanner, accurestMessaging) + this(arguments.stubRunnerOptions, arguments.repositoryPath, arguments.stub) + } + + StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath, StubConfiguration stubsConfiguration) { + this(stubRunnerOptions, repositoryPath, stubsConfiguration, new NoOpAccurestMessaging()) } StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath, StubConfiguration stubsConfiguration, - AccurestMessaging accurestMessaging) { + AccurestMessaging accurestMessaging) { this.stubsConfiguration = stubsConfiguration this.stubRunnerOptions = stubRunnerOptions this.stubRepository = new StubRepository(new File(repositoryPath))