use of com.linkedin.restli.examples.groups.api.GroupMembershipParamArray in project rest.li by linkedin.
the class TestGroupsClient method testComplexArrayParameter.
@Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProvider")
public void testComplexArrayParameter(RootBuilderWrapper<Integer, Group> groupBuilders) throws RemoteInvocationException {
final GroupMembershipParam elem = new GroupMembershipParam();
elem.setIntParameter(7);
elem.setStringParameter("success");
final Collection<GroupMembershipParam> array = Arrays.asList(elem, elem);
getClient().sendRequest(groupBuilders.findBy("ComplexCircuit").setQueryParam("records", Arrays.asList(elem)).build()).getResponse();
getClient().sendRequest(groupBuilders.findBy("ComplexCircuit").setQueryParam("records", array).build()).getResponse();
getClient().sendRequest(groupBuilders.findBy("ComplexCircuit").setQueryParam("records", new GroupMembershipParamArray(array)).build()).getResponse();
getClient().sendRequest(groupBuilders.findBy("ComplexCircuit").addQueryParam("Records", elem).build()).getResponse();
getClient().sendRequest(groupBuilders.findBy("ComplexCircuit").addQueryParam("Records", elem).addQueryParam("Records", elem).build()).getResponse();
}
Aggregations