Search in sources :

Example 1 with LinksHelper.createLink

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));
}
Also used : Link(org.eclipse.che.api.core.rest.shared.dto.Link) LinksHelper.createLink(org.eclipse.che.api.core.util.LinksHelper.createLink) Test(org.testng.annotations.Test)

Aggregations

Link (org.eclipse.che.api.core.rest.shared.dto.Link)1 LinksHelper.createLink (org.eclipse.che.api.core.util.LinksHelper.createLink)1 Test (org.testng.annotations.Test)1