use of org.eclipse.che.api.core.util.LinksHelper.createLink in project che by eclipse.
the class DefaultHttpJsonRequestTest method shouldSendJsonObjectBody.
@Test
public void shouldSendJsonObjectBody(ITestContext ctx) throws Exception {
final DefaultHttpJsonRequest request = new DefaultHttpJsonRequest(getUrl(ctx) + "/application-json");
final Link link = LinksHelper.createLink("GET", "localhost:8080/application-json", "rel");
final List<Link> links = request.usePostMethod().setBody(Collections.singletonList(link)).request().asList(Link.class);
assertEquals(links, Collections.singletonList(link));
}
Aggregations