use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method batchGetWithProjections.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batchGetWithProjections")
public Object[][] batchGetWithProjections() {
//Sample valid URIs:
//"test?fields=message,id&ids=1&ids=2&ids=3"
//"test?fields=message,id&ids=List(1,2,3)"
final Set<String> fieldSet = new HashSet<String>();
fieldSet.add("message");
fieldSet.add("id");
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, fieldSet);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", idSet, null, fieldSet);
return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
use of com.linkedin.restli.internal.testutils.URIDetails in project rest.li by linkedin.
the class TestClientBuilders method subResourceBatch.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subResourceBatch")
public Object[][] subResourceBatch() {
//Sample URIs:
//"foo/bar/1/baz?ids=1&ids=2"
//"foo/bar/1/baz?ids=List(1,2)"
final Set<String> idSet = new HashSet<String>();
idSet.add("1");
idSet.add("2");
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/bar/1/baz", idSet, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/bar/1/baz", 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 noEntity.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "noEntity")
public Object[][] noEntity() {
//Sample URIs:
//"test"
//"test"
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", null, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", 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 complexKey.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "complexKey")
public Object[][] complexKey() {
//Sample URIs:
//"test/$params.id=2&$params.message=paramMessage&id=1&message=keyMessage"
//"test/($params:(id:2,message:paramMessage),id:1,message:keyMessage)"
final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/$params.id=2&$params.message=paramMessage&id=1&message=keyMessage", null, null, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/($params:(id:2,message:paramMessage),id:1,message:keyMessage)", 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 batchSingleWithParam.
@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batchSingleWithParam")
public Object[][] batchSingleWithParam() {
//"test?foo=bar&ids=1"
//"test?foo=bar&ids=List(1)"
final Set<String> idSet = new HashSet<String>();
idSet.add("1");
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", idSet, queryParamsMap, null);
final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", idSet, queryParamsMap, null);
return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Aggregations