Search in sources :

Example 1 with GroupMembershipParamArray

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();
}
Also used : GroupMembershipParam(com.linkedin.restli.examples.groups.api.GroupMembershipParam) GroupMembershipParamArray(com.linkedin.restli.examples.groups.api.GroupMembershipParamArray) Test(org.testng.annotations.Test)

Aggregations

GroupMembershipParam (com.linkedin.restli.examples.groups.api.GroupMembershipParam)1 GroupMembershipParamArray (com.linkedin.restli.examples.groups.api.GroupMembershipParamArray)1 Test (org.testng.annotations.Test)1