Added HttpStatus delegate in the Groovy DSL Response

with this change there are numerous helper methods that should provide a more descriptive DSL for the response status. Instead of a numerical status you can now call a method e.g. instead of 200 call OK()

fixes gh-575
This commit is contained in:
Marcin Grzejszczak
2018-03-15 09:59:11 +01:00
parent f31e9ba137
commit 8e4360535c
77 changed files with 1064 additions and 347 deletions

View File

@@ -13,7 +13,7 @@ org.springframework.cloud.contract.spec.Contract.make {
}
}
response { // (6)
status 200 // (7)
status OK() // (7)
body([ // (8)
fraudCheckStatus: "FRAUD",
rejectionReason: "Amount too high"