use of io.dropwizard.jersey.jackson.JacksonMessageBodyProviderTest.PartialExample in project dropwizard by dropwizard.
the class ConstraintViolationExceptionMapperTest method returnPartialBothValidatedRequestEntities.
@Test
public void returnPartialBothValidatedRequestEntities() {
final Response response = target("/valid/validatedPartialExampleBoth").request().post(Entity.json("{\"id\":1,\"text\":\"hello Cemo\"}"));
assertThat(response.getStatus()).isEqualTo(200);
PartialExample ex = response.readEntity(PartialExample.class);
assertThat(ex.id).isEqualTo(1);
assertThat(ex.text).isEqualTo("hello Cemo");
}
Aggregations