-
Notifications
You must be signed in to change notification settings - Fork 100
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
Questions about JakartaValidationPlugin and validation logic for creating fixture objects #1118
Comments
@doljae Fixture Monkey works as follows.
Fixture Monkey has two logical flows to satisfy the validation.
For better understanding, you can check the classes below.
Thank you. |
Thanks for your detailed explanation. Which jqwik-related classes actually generate values please? |
I didn't understand it properly. Can you elaborate on that? |
Sorry for the late reply. |
Describe your question
My understanding is that the
JakartaValidationPlugin
reads the settings in the validation annotation and creates a fixture object with values that match the settings.This is not exact, but the way I understand the above logic to work is as follows.
It seems to be repeating the process of creating an object by first filling the fields with random values and then validating that the object is valid, rather than filling the fields with the validated values from the beginning.
So, I think if we can, it would be better to create the object when all the fields of the object have values that satisfy the conditions.
Of course, since Fixture Monkey uses the logic of the hibernate validator, in some ways I think creating an object and running the validation logic is a natural and much more common implementation.
I'm curious about the design history or opinions of the maintainer on this.
The text was updated successfully, but these errors were encountered: