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
In our project, we have a module which defines an API - it's essentially a bunch of interfaces which are meant to be implemented elsewhere, possibly multiple times. We use the assertion generator plugin to generate asserts for these, which works great, but it becomes tedious if you want to assert multiple properties. We don't want to use the recursive comparator since this uses fields, not the properties as defined by the interfaces.
Is it possible to have the generator also generate a method which essentially chains all the generated single property asserts against an actual object of the same interface type? I feel like that should be possible, but maybe I'm missing something. That way you get the nice error messages from the single assertions without having to manually type all of this.
(bonus points if it can do it recursively (i.e. a nested interface which also has a generated assertion class for it would be reused), but I get that that would increase the complexity, and it's something we can easily glue ourselves)
The text was updated successfully, but these errors were encountered:
In our project, we have a module which defines an API - it's essentially a bunch of interfaces which are meant to be implemented elsewhere, possibly multiple times. We use the assertion generator plugin to generate asserts for these, which works great, but it becomes tedious if you want to assert multiple properties. We don't want to use the recursive comparator since this uses fields, not the properties as defined by the interfaces.
Is it possible to have the generator also generate a method which essentially chains all the generated single property asserts against an actual object of the same interface type? I feel like that should be possible, but maybe I'm missing something. That way you get the nice error messages from the single assertions without having to manually type all of this.
(bonus points if it can do it recursively (i.e. a nested interface which also has a generated assertion class for it would be reused), but I get that that would increase the complexity, and it's something we can easily glue ourselves)
The text was updated successfully, but these errors were encountered: