Last active
May 5, 2019 14:30
-
-
Save AlicanAkkus/0336b5f7b6b2f3e0662b04df58898f76 to your computer and use it in GitHub Desktop.
Spring Cloud Contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.cloud.contract.spec.Contract | |
Contract.make { | |
description "should retrieve account" | |
request { | |
method GET() | |
url ('/api/v1/accounts'){ | |
queryParameters { | |
parameter("accountId", 1L) | |
} | |
} | |
} | |
response { | |
status OK() | |
headers { | |
contentType(applicationJson()) | |
} | |
body(file("retrieveAccountResponse.json")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment