Search in sources :

Example 1 with ValidatedPojoMultipleConstraints

use of uk.co.jemos.podam.test.dto.ValidatedPojoMultipleConstraints in project podam by devopsfolks.

the class ValidatedPojoTest method whenDigitsAndDecimalMinOrDecimalMaxAreAttachedToTheSameFieldPodamShouldUseMinimumRequirement.

@Test
@Title("When the @Digits and @DecimalMin and @DecimalMax applied to the same field, Podam should use minimum requirements")
public void whenDigitsAndDecimalMinOrDecimalMaxAreAttachedToTheSameFieldPodamShouldUseMinimumRequirement() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    ValidatedPojoMultipleConstraints pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ValidatedPojoMultipleConstraints.class, podamFactory);
    podamValidationSteps.theObjectShouldNotBeNull(pojo);
    Validator validator = podamFactorySteps.givenAJavaxValidator();
    validatorSteps.thePojoShouldNotViolateAnyValidations(validator, pojo);
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) ValidatedPojoMultipleConstraints(uk.co.jemos.podam.test.dto.ValidatedPojoMultipleConstraints) Validator(javax.validation.Validator) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Aggregations

Validator (javax.validation.Validator)1 Title (net.thucydides.core.annotations.Title)1 Test (org.junit.Test)1 PodamFactory (uk.co.jemos.podam.api.PodamFactory)1 ValidatedPojoMultipleConstraints (uk.co.jemos.podam.test.dto.ValidatedPojoMultipleConstraints)1