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
This library is great! Great for testing Lombok-generated equals-and-hashcode, for instance. However, in our context we do not care much about actual JavaBeans, for instance many classes do not have a default constructor, instead a constructor for all arguments. Some are even immutable.
Unfortunately, these classes cannot be tested with bean-matchers, even testing for a valid hashcode results in “Bean does not have no-args constructor”. It would be nice to lift that requirement – perhaps by registering default instances or by alternatively using the all-args-constructor for setting the values.
The text was updated successfully, but these errors were encountered:
I came here to say the same. It would be great if it was possible to register a custom factory for beans, so Lombok classes could be instantiated via @builder or @AllArgsConstructor, or use bean-matchers on already constructed objects instead of classes.
This library is great! Great for testing Lombok-generated equals-and-hashcode, for instance. However, in our context we do not care much about actual JavaBeans, for instance many classes do not have a default constructor, instead a constructor for all arguments. Some are even immutable.
Unfortunately, these classes cannot be tested with bean-matchers, even testing for a valid hashcode results in “Bean does not have no-args constructor”. It would be nice to lift that requirement – perhaps by registering default instances or by alternatively using the all-args-constructor for setting the values.
The text was updated successfully, but these errors were encountered: