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
For example, I would like custom assertions for BigDecimal only like: has${Property}Of(Number value)
public ${self_type} has${Property}Of(Number n) ${throws}{
if (new BigDecimal(n.toString()).compareTo(actual.${property}) != 0) {
throw new AssertionError("expected " + n + " but got " + actual.${property});
}
}
So then I can do:
PersonAssert.hasHeightOf(5);
Instead of
PersonAssert.hasHeightOf(BigDecimal.valueOf(5));
And of course I wouldn't want it to also generate PersonAssert.hasNameOf(Number n);.
So it would be nice to be able to specify a template just for BigDecimal property types. And I assume that this could be generalized to any property type.
The text was updated successfully, but these errors were encountered:
lhannest
changed the title
Support objectAssertion templates for specific classes
Support special objectAssertion templates for specific property types
Apr 1, 2022
For example, I would like custom assertions for BigDecimal only like:
has${Property}Of(Number value)
So then I can do:
Instead of
And of course I wouldn't want it to also generate
PersonAssert.hasNameOf(Number n);
.So it would be nice to be able to specify a template just for BigDecimal property types. And I assume that this could be generalized to any property type.
The text was updated successfully, but these errors were encountered: