This commit adds auto-configuration and documentation for MockMvcTester,
a wrapper of MockMvc that provides AssertJ integration as well as a
fluent API to build requests. The main differences compared to the
regular MockMvc are as follows:
* No need for static imports for building requests and define assertions
* No need to handle unchecked exception as they can be asserted instead
* Support for converting the response body to data types
Closes gh-41198
Replace `DockerImageNames` with a enum and relocate it from the
`testcontainers` to `container` package. The enum now also
becomes a common location that we can use to apply container
configuration such as timeouts.
Closes gh-41164
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
When Spring Framework builds a `RestClient` from a `RestTemplate`, it
will use any `UriTemplateHandler` that has been set on the
`RestTemplate` if the provided `UriTemplateHandler` is also a
`UriBuilderFactory`. Prior to this commit, Spring Boot's
`RestTemplateBuilder#rootUri` set a `UriTemplateHandler` on the created
`RestTemplate`, but it was not a `UriBuilderFactory` so `RestClient`
would not consider it.
With this commit, `RestTemplateBuilder#rootUri` sets a
`UriTemplateHandler` that is also a `UriBuilderFactory` so that any
root URI that is set on the `RestTemplateBuilder` will be applied to a
`RestClient` also.
Fixes gh-39317
If @AutoConfigureObservability is applied to a sliced test, it
auto-configures:
- An in-memory MeterRegistry
- A no-op Tracer
- An ObservationRegistry
Closes gh-38568
This commit adds support for configuring a `RestClient.Builder` and
`MockRestServiceServer` support for the `RestClient` when using
`@RestClientTest` sliced tests.
Closes gh-37033