use of io.wring.fake.FkBase in project wring by yegor256.
the class TkFaviconTest method rendersIcon.
/**
* TkFavicon can render home page.
* @throws Exception If some problem inside
*/
@Test
public void rendersIcon() throws Exception {
final Take take = new TkAppAuth(new TkFavicon(new FkBase()));
MatcherAssert.assertThat(new RsPrint(take.act(new RqFake())).printBody(), Matchers.notNullValue());
}
use of io.wring.fake.FkBase in project wring by yegor256.
the class CycleTest method processesSinglePipe.
/**
* Cycle can process a single pipe.
* @throws Exception If some problem inside
*/
@Test
public void processesSinglePipe() throws Exception {
final Base base = new FkBase();
final Pipe pipe = new FkPipe();
new Cycle(base).exec(pipe);
}
use of io.wring.fake.FkBase in project wring by yegor256.
the class CycleTest method processesSinglePipeWithBrokenJson.
/**
* Cycle can process a single pipe with broken JSOn.
* @throws Exception If some problem inside
*/
@Test
public void processesSinglePipeWithBrokenJson() throws Exception {
final Base base = new FkBase();
final Pipe pipe = new FkPipe(new Directives().add("pipe").add("urn").set("urn:test:1").up().add("json").set("{\"a\":\"/@[a-z0-9\\\\-]\\\\s+\"}").up().up());
new Cycle(base).exec(pipe);
}
use of io.wring.fake.FkBase in project wring by yegor256.
the class TkIndexTest method rendersHomePage.
/**
* TkHome can render home page.
* @throws Exception If some problem inside
*/
@Test
public void rendersHomePage() throws Exception {
final Take take = new TkIndex(new FkBase());
MatcherAssert.assertThat(XhtmlMatchers.xhtml(new RsPrint(take.act(new RqWithHeader(new RqFake("GET", "/"), "Accept", "text/xml"))).printBody()), XhtmlMatchers.hasXPaths("/page/millis", "/page/links/link[@rel='takes:github']", "/page/total"));
}
Aggregations