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