Interface RestTestClientResponse

All Superinterfaces:
org.assertj.core.api.AssertProvider<RestTestClientResponseAssert>

public interface RestTestClientResponse extends org.assertj.core.api.AssertProvider<RestTestClientResponseAssert>
AssertProvider for RestTestClientResponseAssert that holds the result of an exchange performed through RestTestClient. Intended for further use with AssertJ. For example:
ResponseSpec spec = restTestClient.get().uri("/greeting").exchange();

RestTestClientResponse response = RestTestClientResponse.from(spec);
assertThat(response).hasStatusOk();
assertThat(response).contentType().isCompatibleWith(MediaType.APPLICATION_JSON);
assertThat(response).bodyJson().extractingPath("$.message").asString().isEqualTo("Hello World");
Since:
7.0
Author:
Rossen Stoyanchev