From a697d9e8ef1b0c86ed3c002d94ecad9862710f11 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 19 Jul 2016 14:37:52 +0200 Subject: [PATCH] Added tags for docs --- .../com/example/loan/LoanApplicationServiceTests.java | 6 ++++-- .../http-client/src/test/resources/application.yaml | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/samples/standalone/http-client/src/test/java/com/example/loan/LoanApplicationServiceTests.java b/samples/standalone/http-client/src/test/java/com/example/loan/LoanApplicationServiceTests.java index c6a5235ee6..9f45205d18 100644 --- a/samples/standalone/http-client/src/test/java/com/example/loan/LoanApplicationServiceTests.java +++ b/samples/standalone/http-client/src/test/java/com/example/loan/LoanApplicationServiceTests.java @@ -1,7 +1,5 @@ package com.example.loan; -import static org.assertj.core.api.Assertions.assertThat; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -14,10 +12,14 @@ import com.example.loan.model.LoanApplication; import com.example.loan.model.LoanApplicationResult; import com.example.loan.model.LoanApplicationStatus; +import static org.assertj.core.api.Assertions.assertThat; + +// tag::autoconfigure_stubrunner[] @RunWith(SpringRunner.class) @SpringBootTest @AutoConfigureStubRunner public class LoanApplicationServiceTests { +// end::autoconfigure_stubrunner[] @Autowired private LoanApplicationService sut; diff --git a/samples/standalone/http-client/src/test/resources/application.yaml b/samples/standalone/http-client/src/test/resources/application.yaml index b260e2bac4..772482e76c 100644 --- a/samples/standalone/http-client/src/test/resources/application.yaml +++ b/samples/standalone/http-client/src/test/resources/application.yaml @@ -1,3 +1,9 @@ +# tag::stubs[] stubrunner: work-offline: true - stubs.ids: 'com.example:http-server:+:stubs:8080' \ No newline at end of file + stubs.ids: 'com.example:http-server:+:stubs:8080' +# end::stubs[] + +# tag::repo_root[] +# stubrunner.stubs.repositoryRoot: http://repo.spring.io/libs-snapshot +# end::repo_root[]