We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@WebMvcTest
I'd like to test that my exceptions and handled correctly and application/problem+json response is returned.
application/problem+json
For that, I write tests annotated with @WebMvcTest.
Auto-configurations from org.zalando:problem-spring-web-autoconfigure are included in the test context.
org.zalando:problem-spring-web-autoconfigure
Auto-configurations from org.zalando:problem-spring-web-autoconfigure are NOT included in the test context.
Copy content of META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports into:
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports
META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports
@WebFluxTest
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I'd like to test that my exceptions and handled correctly and
application/problem+json
response is returned.For that, I write tests annotated with
@WebMvcTest
.Expected Behavior
Auto-configurations from
org.zalando:problem-spring-web-autoconfigure
are included in the test context.Actual Behavior
Auto-configurations from
org.zalando:problem-spring-web-autoconfigure
are NOT included in the test context.Possible Fix
Copy content of
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
into:META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports
- to support@WebMvcTest
META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports
- to support@WebFluxTest
The text was updated successfully, but these errors were encountered: