use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestGroupsRequestBuilders method requestGroupsBuilderDataProviderEntityWithFields.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestGroupsBuilderDataProviderEntityWithFields")
private static Object[][] requestGroupsBuilderDataProviderEntityWithFields() {
//Sample URIs:
//"groups/1?fields=badge"
//"groups/1?fields=badge"
final Set<String> fieldSet = new HashSet<String>();
fieldSet.add("badge");
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "groups/1", null, null, fieldSet);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "groups/1", null, null, fieldSet);
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 } };
}
use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method subResourceAction1.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subResourceAction1")
public Object[][] subResourceAction1() {
//Sample URIs:
//"foo/bar/1/baz?action=action"
//"foo/bar/1/baz?action=action"
final Map<String, String> queryParamsMap = new HashMap<String, String>();
queryParamsMap.put("action", "action");
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/bar/1/baz", null, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/bar/1/baz", null, queryParamsMap, null);
return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method compoundKey.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "compoundKey")
public Object[][] compoundKey() {
//Sample URIs:
//"test/part1=1&part2=2"
//"test/(part1:1,part2:2)"
//We can compare the serialized compound key as a part of the path since its always serialized into a sorted order
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/part1=1&part2=2", null, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/(part1:1,part2:2)", null, null, null);
return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method batchComplexKey.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batchComplexKey")
public Object[][] batchComplexKey() {
//Sample URIs:
//"test?ids%5B0%5D.$params.id=2&ids%5B0%5D.$params.message=paramMessage1&ids%5B0%5D.id=1&ids%5B0%5D.message=keyMessage1&ids%5B1%5D.$params.id=4&ids%5B1%5D.$params.message=paramMessage2&ids%5B1%5D.id=3&ids%5B1%5D.message=keyMessage2"
//"test?ids=List(($params:(id:2,message:paramMessage1),id:1,message:keyMessage1),($params:(id:4,message:paramMessage2),id:3,message:keyMessage2))"
final Set<DataMap> idList = new HashSet<DataMap>();
final DataMap idMapOne = new DataMap();
idMapOne.put("id", "1");
idMapOne.put("message", "keyMessage1");
final DataMap paramMapOne = new DataMap();
paramMapOne.put("id", "2");
paramMapOne.put("message", "paramMessage1");
idMapOne.put("$params", paramMapOne);
idList.add(idMapOne);
final DataMap idMapTwo = new DataMap();
idMapTwo.put("id", "3");
idMapTwo.put("message", "keyMessage2");
final DataMap paramMapTwo = new DataMap();
paramMapTwo.put("id", "4");
paramMapTwo.put("message", "paramMessage2");
idMapTwo.put("$params", paramMapTwo);
idList.add(idMapTwo);
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", idList, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", idList, null, null);
return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
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 } };
}
Aggregations