Search in sources :

Example 1 with NonEmptyStringParam

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

the class ParamValidatorUnwrapperTest method failsWithInvalidNonEmptyStringParam.

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

Aggregations

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