Search in sources :

Example 6 with GroupMembershipsBuilders

use of com.linkedin.restli.examples.groups.client.GroupMembershipsBuilders in project rest.li by linkedin.

the class TestGroupsRequestBuilders method testAssociationBatchGetByAssociationMultipleCompoundKeys2.

@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestMembershipsBatchDataProvider")
public void testAssociationBatchGetByAssociationMultipleCompoundKeys2(URIDetails expectedURIDetails) throws IOException, RestException {
    GroupMembershipsBuilders.Key key1 = new GroupMembershipsBuilders.Key().setGroupId(1).setMemberId(1);
    GroupMembershipsBuilders.Key key2 = new GroupMembershipsBuilders.Key().setGroupId(2).setMemberId(1);
    GroupMembershipsBuilders.Key key3 = new GroupMembershipsBuilders.Key().setGroupId(2).setMemberId(2);
    Request<BatchKVResponse<CompoundKey, GroupMembership>> request = new GroupMembershipsBuilders().batchGet().ids(key1, key2, key3).buildKV();
    checkRequestBuilder(request, ResourceMethod.BATCH_GET, BatchKVResponseDecoder.class, expectedURIDetails, null);
}
Also used : GroupMembershipsBuilders(com.linkedin.restli.examples.groups.client.GroupMembershipsBuilders) CompoundKey(com.linkedin.restli.common.CompoundKey) BatchKVResponse(com.linkedin.restli.client.response.BatchKVResponse) Test(org.testng.annotations.Test)

Aggregations

CompoundKey (com.linkedin.restli.common.CompoundKey)6 GroupMembershipsBuilders (com.linkedin.restli.examples.groups.client.GroupMembershipsBuilders)6 GroupMembership (com.linkedin.restli.examples.groups.api.GroupMembership)5 GroupMembershipsRequestBuilders (com.linkedin.restli.examples.groups.client.GroupMembershipsRequestBuilders)4 URIDetails (com.linkedin.restli.internal.testutils.URIDetails)4 DataProvider (org.testng.annotations.DataProvider)4 HashMap (java.util.HashMap)3 BatchKVResponse (com.linkedin.restli.client.response.BatchKVResponse)2 Test (org.testng.annotations.Test)2 ComplexKeyGroupMembership (com.linkedin.restli.examples.groups.api.ComplexKeyGroupMembership)1 HashSet (java.util.HashSet)1