use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method batch.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batch")
public Object[][] batch() {
//Sample URIs:
//"test?ids=1&ids=2&ids=3"
//"test?ids=List(1,2,3)"
final Set<String> idSet = new HashSet<String>();
idSet.add("1");
idSet.add("2");
idSet.add("3");
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", idSet, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", idSet, 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 action.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "action")
public Object[][] action() {
//Sample valid URIs:
//"test/1?action=action"
//"test/1?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(), "test/1", null, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/1", 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 builderParam.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "builderParam")
public Object[][] builderParam() {
//Sample URIs:
//"test/1?arrayKey1=3&arrayKey1=4&arrayKey1=5&arrayKey2=3&arrayKey2=4&arrayKey2=5&simpleKey=2"
//"test/1?arrayKey1=List(3,4,5)&arrayKey2=List(3,4,5)&simpleKey=2"
final Map<String, Object> queryParamsMap = new HashMap<String, Object>();
queryParamsMap.put("simpleKey", "2");
final DataList arrayKey1List = new DataList();
arrayKey1List.add("3");
arrayKey1List.add("4");
arrayKey1List.add("5");
final DataList arrayKey2List = new DataList();
arrayKey2List.add("3");
arrayKey2List.add("4");
arrayKey2List.add("5");
queryParamsMap.put("arrayKey1", arrayKey1List);
queryParamsMap.put("arrayKey2", arrayKey2List);
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/1", null, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/1", 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 subResourceAction2.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subResourceAction2")
public Object[][] subResourceAction2() {
//Sample URIs:
//"foo/bar/http%3A%2F%2Fexample.com%2Fimages%2F1.png/baz?action=action"
//"foo/bar/http%3A%2F%2Fexample.com%2Fimages%2F1.png/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/http%3A%2F%2Fexample.com%2Fimages%2F1.png/baz", null, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/bar/http%3A%2F%2Fexample.com%2Fimages%2F1.png/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 getAll3.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "getAll3")
public Object[][] getAll3() {
//Sample URIs:
//"test?count=4"
//"test?count=4"
final Map<String, String> queryParamsMap = new HashMap<String, String>();
queryParamsMap.put("count", "4");
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 } };
}
Aggregations