-
-
Save jwalgemoed/66bda2f036b5f569f6d0a1254f03f931 to your computer and use it in GitHub Desktop.
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
fun verify(testRestTemplate: TestRestTemplate) { | |
val entity = if (request.body != null) { | |
HttpEntity(request.body, request.headers) | |
} else { | |
HttpEntity(request.headers) | |
} | |
val actualResponse = testRestTemplate.exchange(request.path, request.method, entity, String::class.java) | |
Assert.assertEquals("Actual HTTP response code doesn't match expected value.", response.status, actualResponse.statusCode) | |
assertJsonEquals(response.body, actualResponse.body) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment