Search in sources :

Example 1 with IntParam

use of io.dropwizard.jersey.params.IntParam in project dropwizard by dropwizard.

the class ParamValidatorUnwrapperTest method failsWithInvalidIntParam.

@Test
public void failsWithInvalidIntParam() {
    final Example example = new Example();
    example.inter = new IntParam("2");
    final Set<ConstraintViolation<Example>> validate = validator.validate(example);
    assertThat(validate).hasSize(1);
}
Also used : IntParam(io.dropwizard.jersey.params.IntParam) ConstraintViolation(javax.validation.ConstraintViolation) Test(org.junit.Test)

Aggregations

IntParam (io.dropwizard.jersey.params.IntParam)1 ConstraintViolation (javax.validation.ConstraintViolation)1 Test (org.junit.Test)1