diff --git a/README.adoc b/README.adoc index fae7b6234f..6b918f90a5 100644 --- a/README.adoc +++ b/README.adoc @@ -670,7 +670,7 @@ Next, the `Spring Cloud Contract Verifier` Maven plugin ${spring-cloud-contract.version} true - com.example.fraud.MvcTest + com.example.fraud ---- @@ -827,7 +827,7 @@ In the configuration of the Maven plugin we passed the `baseClassForTests` prope ${spring-cloud-contract.version} true - com.example.fraud.MvcTest + com.example.fraud ---- @@ -843,7 +843,7 @@ import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; import org.junit.Before; -public class MvcTest { +public class FraudBase { @Before public void setup() { @@ -1507,6 +1507,11 @@ when some incompatible changes are done. The rest of the flow looks the same. +===== Can I have multiple base classes for tests? + +Yes! Check out the https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html#different_base_classes_for_contracts[Different base classes for contracts] sections +of either Gradle or Maven plugins. + === Links Here you can find interesting links related to Spring Cloud Contract Verifier: diff --git a/docs/src/main/asciidoc/verifier/introduction.adoc b/docs/src/main/asciidoc/verifier/introduction.adoc index afd6d9f768..d6217a5c40 100644 --- a/docs/src/main/asciidoc/verifier/introduction.adoc +++ b/docs/src/main/asciidoc/verifier/introduction.adoc @@ -182,7 +182,7 @@ As consumers we need to define what exactly we want to achieve. We need to formu [source,groovy,indent=0] ---- -include::{introduction_url}/samples/standalone/dsl/http-server/src/test/resources/contracts/shouldMarkClientAsFraud.groovy[] +include::{introduction_url}/samples/standalone/dsl/http-server/src/test/resources/contracts/fraud/shouldMarkClientAsFraud.groovy[] ---- The Contract is written using a statically typed Groovy DSL. You might be wondering what are those @@ -353,7 +353,7 @@ That's because all the generated tests will extend that class. Over there you ca [source,java,indent=0] ---- -include::{introduction_url}/samples/standalone/dsl/http-server/src/test/java/com/example/fraud/MvcTest.java[] +include::{introduction_url}/samples/standalone/dsl/http-server/src/test/java/com/example/fraud/FraudBase.java[] ---- Now, if you run the `./mvnw clean install` you would get sth like this: