@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
-@AutoConfigureWireMock
public class WiremockForDocsClassRuleTests {
// Start WireMock on some dynamic port
+ // for some reason `dynamicPort()` is not working properly
@ClassRule
public static WireMockClassRule wiremock = new WireMockClassRule(
WireMockSpring.options().dynamicPort());
@@ -1290,7 +1290,7 @@ Full test is generated by Spring Cloud Contract Verifier.
@@ -1483,7 +1483,7 @@ for response verification.
going through the process. CDC is all about communication.
@@ -2003,28 +2003,16 @@ git pull https://your-git-server.com/server-side-fork.git contract-change-pr
package com.example.fraud;
-import org.junit.Before;
-
+import com.example.fraud.FraudDetectionController;
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc;
+import org.junit.Before;
+
public class FraudBase {
@Before
public void setup() {
- RestAssuredMockMvc.standaloneSetup(new FraudDetectionController(),
- new FraudStatsController(stubbedStatsProvider()));
- }
-
- private StatsProvider stubbedStatsProvider() {
- return fraudType -> {
- switch (fraudType) {
- case DRUNKS:
- return 100;
- case ALL:
- return 200;
- }
- return 0;
- };
+ RestAssuredMockMvc.standaloneSetup(new FraudDetectionController());
}
public void assertThatRejectionReasonIsNull(Object rejectionReason) {
@@ -2525,7 +2513,7 @@ consumer will you break with your local changes.
Let’s assume that we have a producer with coordinates com.example:server and 3 consumers: client1,
client2, client3. Then in the repository with common contracts you would have the following setup
-(which you can checkout here:
+(which you can checkout
here:
@@ -2573,15 +2561,15 @@ one to one to the contents of the repo.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>1.5.0.BUILD-SNAPSHOT</version>
+ <version>1.4.2.BUILD-SNAPSHOT</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
- <spring-cloud-contract.version>1.1.0.BUILD-SNAPSHOT</spring-cloud-contract.version>
- <spring-cloud-dependencies.version>Dalston.BUILD-SNAPSHOT</spring-cloud-dependencies.version>
+ <spring-cloud-contract.version>1.0.4.BUILD-SNAPSHOT</spring-cloud-contract.version>
+ <spring-cloud-dependencies.version>Camden.BUILD-SNAPSHOT</spring-cloud-dependencies.version>
</properties>
<dependencyManagement>