use of org.takes.http.FtRemote in project wring by yegor256.
the class TkAppTest method rendersHomePageViaHttp.
/**
* App can render front page.
* @throws Exception If some problem inside
*/
@Test
public void rendersHomePageViaHttp() throws Exception {
final Take app = new TkApp(new FkBase());
new FtRemote(app).exec(home -> {
new JdkRequest(home).fetch().as(RestResponse.class).assertStatus(HttpURLConnection.HTTP_OK).as(XmlResponse.class).assertXPath("/xhtml:html");
new JdkRequest(home).through(VerboseWire.class).header("Accept", "application/xml").fetch().as(RestResponse.class).assertStatus(HttpURLConnection.HTTP_OK).as(XmlResponse.class).assertXPath("/page/version");
});
}
Aggregations