use of com.linkedin.restli.examples.custom.types.DateCoercer in project rest.li by linkedin.
the class TestCustomTypesRequestBuilders method testAssociationKeys.
@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "request3BuilderDataProviderEntity")
public void testAssociationKeys(RootBuilderWrapper<CompoundKey, Greeting> builders, ProtocolVersion version, String expectedUri) throws IOException, RestException {
// normally coercer registration is handled in RestliAnnotationReader,
// but that isn't run here because this is just a unit test. So, we need to
// force registration of the DateCoercer because it isn't contained in Date itself.
new DateCoercer();
CustomTypes3Builders.Key key = new CustomTypes3Builders.Key().setLongId(new CustomLong(5L)).setDateId(new Date(13L));
Request<Greeting> request = builders.get().id(key).build();
checkRequestBuilder(request, ResourceMethod.GET, EntityResponseDecoder.class, expectedUri, null, version);
}
Aggregations