Search in sources :

Example 31 with URIDetails

use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.

the class TestClientBuilders method getOnKeyless.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "getOnKeyless")
public Object[][] getOnKeyless() {
    //Sample URIs:
    //"test?fields=message,id"
    //"test?fields=message,id"
    final Set<String> fieldSet = new HashSet<String>();
    fieldSet.add("message");
    fieldSet.add("id");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", null, null, fieldSet);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", null, null, fieldSet);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) ByteString(com.linkedin.data.ByteString) HashSet(java.util.HashSet) DataProvider(org.testng.annotations.DataProvider)

Example 32 with URIDetails

use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.

the class TestClientBuilders method subSubResourceNoEntity.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subSubResourceNoEntity")
public Object[][] subSubResourceNoEntity() {
    //Sample URIs:
    //"foo/1/bar/2/baz"
    //"foo/1/bar/2/baz"
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/1/bar/2/baz", null, null, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/1/bar/2/baz", null, null, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) DataProvider(org.testng.annotations.DataProvider)

Example 33 with URIDetails

use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.

the class TestClientBuilders method noEntityWithParam.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "noEntityWithParam")
public Object[][] noEntityWithParam() {
    //Sample URIs:
    //"test?foo=bar"
    //"test?foo=bar"
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("foo", "bar");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", null, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) DataProvider(org.testng.annotations.DataProvider)

Example 34 with URIDetails

use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.

the class TestClientBuilders method encodingQuestionMark.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "encodingQuestionMark")
public Object[][] encodingQuestionMark() {
    //Sample URIs:
    //"test/3?foo?bar=baz?qux"
    //"test/3?foo?bar=baz?qux"
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("foo?bar", "baz?qux");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/3", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/3", null, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) DataProvider(org.testng.annotations.DataProvider)

Example 35 with URIDetails

use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.

the class TestClientBuilders method subSubResourceSingleEntity.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subSubResourceSingleEntity")
public Object[][] subSubResourceSingleEntity() {
    //"foo/1/bar/2/baz/3"
    //"foo/1/bar/2/baz/3"
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/1/bar/2/baz/3", null, null, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/1/bar/2/baz/3", null, null, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) DataProvider(org.testng.annotations.DataProvider)

Aggregations

URIDetails (com.linkedin.restli.internal.testutils.URIDetails)68 DataProvider (org.testng.annotations.DataProvider)65 HashMap (java.util.HashMap)39 ByteString (com.linkedin.data.ByteString)34 HashSet (java.util.HashSet)20 Group (com.linkedin.restli.examples.groups.api.Group)10 GroupsBuilders (com.linkedin.restli.examples.groups.client.GroupsBuilders)10 GroupsRequestBuilders (com.linkedin.restli.examples.groups.client.GroupsRequestBuilders)10 DataMap (com.linkedin.data.DataMap)7 CompoundKey (com.linkedin.restli.common.CompoundKey)4 GroupContact (com.linkedin.restli.examples.groups.api.GroupContact)4 GroupMembership (com.linkedin.restli.examples.groups.api.GroupMembership)4 ContactsBuilders (com.linkedin.restli.examples.groups.client.ContactsBuilders)4 ContactsRequestBuilders (com.linkedin.restli.examples.groups.client.ContactsRequestBuilders)4 GroupMembershipsBuilders (com.linkedin.restli.examples.groups.client.GroupMembershipsBuilders)4 GroupMembershipsRequestBuilders (com.linkedin.restli.examples.groups.client.GroupMembershipsRequestBuilders)4 CollectionMetadata (com.linkedin.restli.common.CollectionMetadata)3 CollectionResponse (com.linkedin.restli.common.CollectionResponse)3 Test (org.testng.annotations.Test)3 DataComplex (com.linkedin.data.DataComplex)2