use of com.linkedin.restli.examples.typeref.api.CustomLongRefArray in project rest.li by linkedin.
the class TestCustomTypesClient method testCustomLongArrayOnAction.
@Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
public void testCustomLongArrayOnAction(RootBuilderWrapper<Long, Greeting> builders) throws RemoteInvocationException {
CustomLongRefArray ls = new CustomLongRefArray();
ls.add(new CustomLong(1L));
ls.add(new CustomLong(2L));
Request<CustomLongRefArray> request = builders.<CustomLongRefArray>action("ArrayAction").setActionParam("Ls", ls).build();
CustomLongRefArray elements = getClient().sendRequest(request).getResponse().getEntity();
Assert.assertEquals(elements.size(), 2);
Assert.assertEquals(elements.get(0).toLong().longValue(), 1L);
Assert.assertEquals(elements.get(1).toLong().longValue(), 2L);
}
Aggregations