mtedone / podam

PODAM - POjo DAta Mocker
https://mtedone.github.io/podam
MIT License
326 stars 749 forks source link

Support PositiveOrZero annotation from javax.validation #283

Closed klDen closed 4 years ago

klDen commented 4 years ago

Hello,

Thank you for this nice lib!

Using the annotation @PositiveOrZero returns an error. Can you please support this annotation?

Currently, I'm bypassing the error with ((RandomDataProviderStrategy)podamFactory.getStrategy()).addOrReplaceAttributeStrategy(PositiveOrZero.class, (AttributeStrategy<Number>) (attrType, attrAnnotations) -> 10000L);

Used podam version: 7.2.4.RELEASE Used hibernate validation version: 6.1.5.Final

Thank you!

klDen commented 4 years ago

Please support @ Positive as well. I am currently using

    ((RandomDataProviderStrategy) PODAM_FACTORY.getStrategy())
        .addOrReplaceAttributeStrategy(
            Positive.class,
            (AttributeStrategy<Number>)
                (attrType, attrAnnotations) -> FAKER.number().numberBetween(1, Long.MAX_VALUE));
daivanov commented 4 years ago

Fixed in podam 7.2.5