From eabb0f6724cd783a1509e3775b5c627ed941f24f Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Wed, 7 Dec 2016 13:59:03 +0100 Subject: [PATCH] Updated docs --- docs/src/main/asciidoc/verifier/contract.adoc | 2 +- .../spring-cloud-contract-verifier.adoc | 2 +- .../provider/moco/MocoHttpServerStub.groovy | 19 +++++++++++++++--- .../moco/MocoHttpServerStubSpec.groovy | 16 +++++++++++++++ .../test/resources/META-INF/spring.factories | 0 .../{ => src}/test/resources/application.yml | 0 .../{ => src}/test/resources/logback.xml | 0 ...tectionServerMoco-0.0.1-SNAPSHOT-stubs.jar | Bin ...raudDetectionServerMoco-0.0.1-SNAPSHOT.pom | 0 .../maven-metadata.xml | 0 10 files changed, 34 insertions(+), 5 deletions(-) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy (66%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy (68%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/META-INF/spring.factories (100%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/application.yml (100%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/logback.xml (100%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT-stubs.jar (100%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT.pom (100%) rename tests/spring-cloud-contract-stub-runner-moco/{ => src}/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/maven-metadata.xml (100%) diff --git a/docs/src/main/asciidoc/verifier/contract.adoc b/docs/src/main/asciidoc/verifier/contract.adoc index 243b60886d..ec1be7ff10 100644 --- a/docs/src/main/asciidoc/verifier/contract.adoc +++ b/docs/src/main/asciidoc/verifier/contract.adoc @@ -595,7 +595,7 @@ In order for Stub Runner to know how to run your stubs you have to define a cust [source,groovy] ---- -include::{converters_path}/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy[indent=0,lines=16..-1] +include::{tests_path}/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy[indent=0,lines=16..-1] ---- and just register it in your `spring.factories` file diff --git a/docs/src/main/asciidoc/verifier/spring-cloud-contract-verifier.adoc b/docs/src/main/asciidoc/verifier/spring-cloud-contract-verifier.adoc index 2a256b8fa1..1c921cbfbb 100644 --- a/docs/src/main/asciidoc/verifier/spring-cloud-contract-verifier.adoc +++ b/docs/src/main/asciidoc/verifier/spring-cloud-contract-verifier.adoc @@ -8,7 +8,7 @@ :stubrunner_core_path: {core_path}/spring-cloud-contract-stub-runner :standalone_samples_path: {samples_path}/standalone/dsl :standalone_messaging_samples_path: {samples_path}/standalone/messaging -:tests_path: ../../../../../tests +:tests_path: {core_path}/tests :samples_url: https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master include::introduction.adoc[] diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy similarity index 66% rename from tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy rename to tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy index 2ea0a8f77f..b1070d184e 100644 --- a/tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy +++ b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStub.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2013-2016 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.cloud.contract.stubrunner.provider.moco import com.github.dreamhead.moco.bootstrap.arg.HttpArgs @@ -5,9 +21,6 @@ import com.github.dreamhead.moco.runner.JsonRunner import org.springframework.cloud.contract.stubrunner.HttpServerStub import org.springframework.util.SocketUtils -/** - * @author Marcin Grzejszczak - */ class MocoHttpServerStub implements HttpServerStub { private boolean started diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy similarity index 68% rename from tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy rename to tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy index 951ac9a055..0e92c8f7e3 100644 --- a/tests/spring-cloud-contract-stub-runner-moco/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy +++ b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2013-2016 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.cloud.contract.stubrunner.provider.moco import org.springframework.beans.factory.annotation.Autowired diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/META-INF/spring.factories b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/META-INF/spring.factories similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/META-INF/spring.factories rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/META-INF/spring.factories diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/application.yml b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/application.yml similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/application.yml rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/application.yml diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/logback.xml b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/logback.xml similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/logback.xml rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/logback.xml diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT-stubs.jar b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT-stubs.jar similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT-stubs.jar rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT-stubs.jar diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT.pom b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT.pom similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT.pom rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/0.0.1-SNAPSHOT/fraudDetectionServerMoco-0.0.1-SNAPSHOT.pom diff --git a/tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/maven-metadata.xml b/tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/maven-metadata.xml similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/maven-metadata.xml rename to tests/spring-cloud-contract-stub-runner-moco/src/test/resources/m2repo/repository/org/springframework/cloud/contract/verifier/stubs/fraudDetectionServerMoco/maven-metadata.xml