Add some docs for restdocs usage and rename some things

This commit is contained in:
Dave Syer
2016-07-26 15:05:12 +01:00
parent aa1d7dc074
commit f46666324b
9 changed files with 175 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
package com.example.fraud;
import static org.springframework.cloud.contract.wiremock.restdocs.RestDocsContracts.verify;
import static org.springframework.cloud.contract.wiremock.restdocs.WireMockRestDocs.verify;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import java.math.BigDecimal;
@@ -47,7 +47,7 @@ public class StubGeneratorTests {
.andDo(verify().jsonPath("$.clientId")
.jsonPath("$[?(@.loanAmount > 1000)]")
.contentType(MediaType.valueOf("application/vnd.fraud.v1+json"))
.contract("markClientAsFraud"));
.stub("markClientAsFraud"));
}
@Test
@@ -63,7 +63,7 @@ public class StubGeneratorTests {
.andDo(verify().jsonPath("$.clientId")
.jsonPath("$[?(@.loanAmount <= 1000)]")
.contentType(MediaType.valueOf("application/vnd.fraud.v1+json"))
.contract("markClientAsNotFraud"));
.stub("markClientAsNotFraud"));
}
}