Closed as not planned
Description
Spring introduced the RestClient interface (https://docs.spring.io/spring-framework/reference/integration/rest-clients.html) recently. I was wondering if there's any plan to add an equivalent class for TestRestTemplate to make some rest call in our tests.
Actual testing looks like this. It would be nice to have a TestRestClient class to make some fluent http call
@SpringBootTest(webEnvironment = RANDOM_PORT)
class ApplicationTests {
@Autowired
private TestRestTemplate testRestTemplate;
@Test
void contextLoads() {
//Make some call using testRestTemplate and make some assertions
}
}
Thanks !