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

Spring Boot Validation #95

Open
Nandakumar-M opened this issue Jun 4, 2021 · 1 comment
Open

Spring Boot Validation #95

Nandakumar-M opened this issue Jun 4, 2021 · 1 comment

Comments

@Nandakumar-M
Copy link

Nandakumar-M commented Jun 4, 2021

Hi,

This is regarding the blog post on spring boot validation.

Under Validating Input to a Spring Service Method, the test for verifying this validation uses @ExtendWith(SpringExtension.class) and @SpringBootTest.

I am trying to keep service layer unit tests free of Spring framework (as recommended here). Unfortunately, unit tests written this way do not trigger validation.

Would be great if you can throw some light on how validation in service layer can be unit tested without using @SpringBootTest. Thanks.

Regards,
Nanda

@Nandakumar-M
Copy link
Author

Will try Validating Programmatically and get back on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant