use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method simpleSubResourceAction1.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "simpleSubResourceAction1")
public Object[][] simpleSubResourceAction1() {
//"foo/1/bar?action=action"
//"foo/1/bar?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/1/bar", null, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/1/bar", 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 search1.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "search1")
public Object[][] search1() {
//Sample URIs:
//"test/key=a%3Ab?count=4&fields=message,id&p=42&q=search&start=1"
//"test/(key:a%3Ab)?count=4&fields=message,id&p=42&q=search&start=1"
final Set<String> fieldSet = new HashSet<String>();
fieldSet.add("message");
fieldSet.add("id");
final Map<String, String> queryParamsMap = new HashMap<String, String>();
queryParamsMap.put("p", "42");
queryParamsMap.put("q", "search");
queryParamsMap.put("start", "1");
queryParamsMap.put("count", "4");
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/key=a%3Ab", null, queryParamsMap, fieldSet);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/(key:a%3Ab)", null, queryParamsMap, fieldSet);
return new Object[][] { { uriDetails1 }, { 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 } };
}
Aggregations