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
Please can you give me an idea how to control overrideDefaultInitialization to certain fields by filter (like excludeField or randomize do), to achieve something like:
The problem is, that we are using generated classes, where generators often initialize collections right at the declaration point such as List<Foo> bar = new ArrayList<>().
These are treated as already initialized and thus are not randomized.
I could set overrideDefaultInitialization(true), but there is a problem of randomizing other fields with useful initial value, most often String constants.
I was able to control this to some point by precisely finding them and excluding such fields, e.g.
Please can you give me an idea how to control overrideDefaultInitialization to certain fields by filter (like excludeField or randomize do), to achieve something like:
The problem is, that we are using generated classes, where generators often initialize collections right at the declaration point such as
List<Foo> bar = new ArrayList<>()
.These are treated as already initialized and thus are not randomized.
I could set overrideDefaultInitialization(true), but there is a problem of randomizing other fields with useful initial value, most often String constants.
I was able to control this to some point by precisely finding them and excluding such fields, e.g.
but you understand this being very time consuming and tricky.
Thank you very much
The text was updated successfully, but these errors were encountered: