Search in sources :

Example 16 with Group

use of com.linkedin.restli.examples.groups.api.Group in project rest.li by linkedin.

the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderEntityAction.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderEntityAction")
private static Object[][] requestGroupsBuilderDataProviderEntityAction() {
    // Sample URIs:
    // "groups/1?action=transferOwnership"
    // "groups/1?action=transferOwnership"
    final Map<String, String> queryParamsMap = new HashMap<>();
    queryParamsMap.put("action", "transferOwnership");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups/1", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups/1", null, queryParamsMap, null);
    return new Object[][] { { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails2 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails2 } };
}
Also used : Group(com.linkedin.restli.examples.groups.api.Group) URIDetails(com.linkedin.restli.internal.testutils.URIDetails) GroupsRequestBuilders(com.linkedin.restli.examples.groups.client.GroupsRequestBuilders) HashMap(java.util.HashMap) GroupsBuilders(com.linkedin.restli.examples.groups.client.GroupsBuilders) DataProvider(org.testng.annotations.DataProvider)

Example 17 with Group

use of com.linkedin.restli.examples.groups.api.Group in project rest.li by linkedin.

the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderSearchWithOptional2.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderSearchWithOptional2")
private static Object[][] requestGroupsBuilderDataProviderSearchWithOptional2() {
    // Sample URIs:
    // "groups?keywords=linkedin&nameKeywords=test&q=search"
    // "groups?keywords=linkedin&nameKeywords=test&q=search"
    final Map<String, String> queryParamsMap = new HashMap<>();
    queryParamsMap.put("keywords", "linkedin");
    queryParamsMap.put("nameKeywords", "test");
    queryParamsMap.put("q", "search");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    return new Object[][] { { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails2 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails2 } };
}
Also used : Group(com.linkedin.restli.examples.groups.api.Group) URIDetails(com.linkedin.restli.internal.testutils.URIDetails) GroupsRequestBuilders(com.linkedin.restli.examples.groups.client.GroupsRequestBuilders) HashMap(java.util.HashMap) GroupsBuilders(com.linkedin.restli.examples.groups.client.GroupsBuilders) DataProvider(org.testng.annotations.DataProvider)

Example 18 with Group

use of com.linkedin.restli.examples.groups.api.Group in project rest.li by linkedin.

the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderSearchWithOptional3.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderSearchWithOptional3")
private static Object[][] requestGroupsBuilderDataProviderSearchWithOptional3() {
    // Sample URIs:
    // "groups?groupID=1&q=search"
    // "groups?groupID=1&q=search"
    final Map<String, String> queryParamsMap = new HashMap<>();
    queryParamsMap.put("groupID", "1");
    queryParamsMap.put("q", "search");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    return new Object[][] { { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails2 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails2 } };
}
Also used : Group(com.linkedin.restli.examples.groups.api.Group) URIDetails(com.linkedin.restli.internal.testutils.URIDetails) GroupsRequestBuilders(com.linkedin.restli.examples.groups.client.GroupsRequestBuilders) HashMap(java.util.HashMap) GroupsBuilders(com.linkedin.restli.examples.groups.client.GroupsBuilders) DataProvider(org.testng.annotations.DataProvider)

Example 19 with Group

use of com.linkedin.restli.examples.groups.api.Group in project rest.li by linkedin.

the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderEntity.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderEntity")
private static Object[][] requestGroupsBuilderDataProviderEntity() {
    // Sample URIs:
    // "groups/1"
    // "groups/1"
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups/1", null, null, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups/1", null, null, null);
    return new Object[][] { { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails2 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails2 } };
}
Also used : Group(com.linkedin.restli.examples.groups.api.Group) URIDetails(com.linkedin.restli.internal.testutils.URIDetails) GroupsRequestBuilders(com.linkedin.restli.examples.groups.client.GroupsRequestBuilders) GroupsBuilders(com.linkedin.restli.examples.groups.client.GroupsBuilders) DataProvider(org.testng.annotations.DataProvider)

Example 20 with Group

use of com.linkedin.restli.examples.groups.api.Group in project rest.li by linkedin.

the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderFindByManagerId.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderFindByManagerId")
private static Object[][] requestGroupsBuilderDataProviderFindByManagerId() {
    // Sample URIs:
    // "groups?managerMemberID=1&q=manager"
    // "groups?managerMemberID=1&q=manager"
    final Map<String, String> queryParamsMap = new HashMap<>();
    queryParamsMap.put("managerMemberID", "1");
    queryParamsMap.put("q", "manager");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups", null, queryParamsMap, null);
    return new Object[][] { { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsBuilders()), uriDetails2 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails1 }, { new RootBuilderWrapper<Integer, Group>(new GroupsRequestBuilders()), uriDetails2 } };
}
Also used : Group(com.linkedin.restli.examples.groups.api.Group) URIDetails(com.linkedin.restli.internal.testutils.URIDetails) GroupsRequestBuilders(com.linkedin.restli.examples.groups.client.GroupsRequestBuilders) HashMap(java.util.HashMap) GroupsBuilders(com.linkedin.restli.examples.groups.client.GroupsBuilders) DataProvider(org.testng.annotations.DataProvider)

Aggregations

Group (com.linkedin.restli.examples.groups.api.Group)28 Test (org.testng.annotations.Test)14 GroupsRequestBuilders (com.linkedin.restli.examples.groups.client.GroupsRequestBuilders)13 GroupsBuilders (com.linkedin.restli.examples.groups.client.GroupsBuilders)11 URIDetails (com.linkedin.restli.internal.testutils.URIDetails)10 DataProvider (org.testng.annotations.DataProvider)10 DataMap (com.linkedin.data.DataMap)9 PatchTree (com.linkedin.data.transform.patch.request.PatchTree)9 HashMap (java.util.HashMap)7 DataComplexProcessor (com.linkedin.data.transform.DataComplexProcessor)4 Patch (com.linkedin.data.transform.patch.Patch)4 EmptyRecord (com.linkedin.restli.common.EmptyRecord)4 Location (com.linkedin.restli.examples.groups.api.Location)3 DataList (com.linkedin.data.DataList)2 RestLiResponseException (com.linkedin.restli.client.RestLiResponseException)2 IdResponse (com.linkedin.restli.common.IdResponse)2 GroupMembershipParam (com.linkedin.restli.examples.groups.api.GroupMembershipParam)2 GroupMembershipsRequestBuilders (com.linkedin.restli.examples.groups.client.GroupMembershipsRequestBuilders)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2