Added configuration options for JUnit rule & messaging

without this change not only can't you configure messaging for JUnit rule but also the default option is misleading - it fials to send any messages and returns true
with this change we're allowing configuration options and change the default behaviour to throwing unsupported operation exceptions

fixes #280
This commit is contained in:
Marcin Grzejszczak
2017-04-26 13:30:33 +02:00
parent cf52e6baa6
commit a075eda67f
9 changed files with 261 additions and 17 deletions

View File

@@ -709,7 +709,7 @@ org.springframework.cloud.contract.spec.Contract.make {
method 'PUT' // (2)
url '/fraudcheck' // (3)
body([ // (4)
clientId: $(regex('[0-9]{10}')),
"client.id": $(regex('[0-9]{10}')),
loanAmount: 99999
])
headers { // (5)
@@ -720,7 +720,7 @@ org.springframework.cloud.contract.spec.Contract.make {
status 200 // (7)
body([ // (8)
fraudCheckStatus: "FRAUD",
rejectionReason: "Amount too high"
"rejection.reason": "Amount too high"
])
headers { // (9)
contentType('application/vnd.fraud.v1+json')