You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
record UserProfile(String homeUrl, String imageUrl) {}
and I want to have custom url link generator for field containing url. About imageUrl then i will need another generator.
With current API, we have to use
#randomize(field -> field.contains(url) but not (imageUrl)
#randomize(field -> field contain imageUrl)
I think it will be better to keep the randomizer order registration, so just define the
#randomize(field -> field contain url)
#randomize(field -> field contain imageUrl)
by changing customFieldRandomizersRegistry and customTypeRandomizersRegistry from HashMap to LinkedHashMap, hence when after adding, we know which one will be applied.
Assume i have a pojo class
and I want to have custom
url
link generator for field containingurl
. AboutimageUrl
then i will need another generator.With current API, we have to use
I think it will be better to keep the randomizer order registration, so just define the
by changing
customFieldRandomizersRegistry
andcustomTypeRandomizersRegistry
from HashMap to LinkedHashMap, hence when after adding, we know which one will be applied.https://github.com/j-easy/easy-random/blob/master/src/main/java/org/jeasy/random/randomizers/registry/CustomRandomizerRegistry.java#L45-L46
Many thanks upfront!
The text was updated successfully, but these errors were encountered: