use of com.linkedin.restli.examples.defaults.api.FillInDefaultsGetRequestBuilder in project rest.li by linkedin.
the class TestFillInDefaultValue method testGet.
@Test(dataProvider = "testGetData")
public void testGet(Long id, HighLevelRecordWithDefault expectedRecord) throws RemoteInvocationException, IOException {
FillInDefaultsRequestBuilders requestBuilders = new FillInDefaultsRequestBuilders();
FillInDefaultsGetRequestBuilder getRequestBuilder = requestBuilders.get();
GetRequest<HighLevelRecordWithDefault> req = getRequestBuilder.id(id).setParam(RestConstants.FILL_IN_DEFAULTS_PARAM, true).build();
HighLevelRecordWithDefault actual = getClient().sendRequest(req).getResponse().getEntity();
Assert.assertEquals(actual, expectedRecord);
}
use of com.linkedin.restli.examples.defaults.api.FillInDefaultsGetRequestBuilder in project rest.li by linkedin.
the class TestFillInDefaultValue method testGetWithFillInDefaults.
@Test(dataProvider = "testGetDataNoFillIn")
public void testGetWithFillInDefaults(Long id, HighLevelRecordWithDefault expectedRecord) throws RemoteInvocationException {
FillInDefaultsRequestBuilders requestBuilders = new FillInDefaultsRequestBuilders();
FillInDefaultsGetRequestBuilder getRequestBuilder = requestBuilders.get();
GetRequest<HighLevelRecordWithDefault> req = getRequestBuilder.id(id).build();
HighLevelRecordWithDefault actual = getClient().sendRequest(req).getResponse().getEntity();
Assert.assertEquals(actual, expectedRecord);
}
Aggregations