-
Notifications
You must be signed in to change notification settings - Fork 234
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
Support for any generic type #375
Comments
@benas would you be prepared to review a pull request that implements handling for these types of situations? It really limits our ability to generate random beans for many common uses of parameterized types |
Why is this limiting? You can register a custom randomizer for that generic type as suggested here. There are a lot of cases to cover to correctly implement this feature:
I believe the clean way to deal with this is to have something like |
I put together a random value generator that fully supports generics. Consider taking a look at: |
EasyRandom version:
easy-random-core-4.0.0
When inside a class, we can randomize a field such as List. However this only seems to work on a limited set of known types (List, etc) and not on simply any type with parameters.
Failing test:
Here is a pretty minimal way to get the actual type:
The text was updated successfully, but these errors were encountered: