hibernate-validator icon indicating copy to clipboard operation
hibernate-validator copied to clipboard

HV-1921 Create a tester library for constraint validators with dependency injection

Open shark300 opened this issue 3 years ago • 6 comments

https://hibernate.atlassian.net/browse/HV-1921

shark300 avatar Jul 26 '22 20:07 shark300

Can one of the admins add this person to the trusted builders? (reply with: "add to whitelist" or "ok to test")

Hibernate-CI avatar Jul 26 '22 20:07 Hibernate-CI

Hey, just a note that I have seen this PR. I have to think a bit about it, especially about where it's best to document this.

gsmet avatar Aug 04 '22 11:08 gsmet

Hi @gsmet , thank you so much for your message.

"I have to think a bit about it" To be honest I have already used a similar way to test custom validators in some Spring Boot apps because the unit testing of validators is one of the most effective ways and it is mentioned on the website of Hibernate Validator. I had some ideas related to the injection (to inject dependencies instead of mocking the whole custom validator) but I did not want to repeat the authors of Spring (DRY).

"especially about where it's best to document this." Yes, I totally agree with you. It was a little bit challenging to find a place for this feature...

shark300 avatar Aug 04 '22 11:08 shark300

Hi @gsmet, Do you have any updates regarding to this PR?

shark300 avatar Oct 03 '22 19:10 shark300

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.