Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestRestTemplate equivalent class for RestClient #40452

Closed
ebussieres opened this issue Apr 19, 2024 · 1 comment
Closed

TestRestTemplate equivalent class for RestClient #40452

ebussieres opened this issue Apr 19, 2024 · 1 comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue

Comments

@ebussieres
Copy link

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 !

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 19, 2024
@wilkinsona
Copy link
Member

Duplicates #39848 and spring-projects/spring-framework#31275.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants