Contract Testing with Pact #10
@Pact(consumer = "consumer-android") | |
fun createPact(builder: PactDslWithProvider): RequestResponsePact { | |
return builder | |
.given("default") | |
.uponReceiving("Fetching application bootstrap information") | |
.path("/v1/bootstrap") | |
.method("GET") .headers(mapOf( | |
"User-Agent" to "DoorDashConsumer/Android" | |
)) | |
.willRespondWith() | |
.status(200) | |
.body(newJsonBody { root -> | |
root.`object`("version") { v -> | |
v.stringType("current_version") | |
v.stringType("minimum_version") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment