Search in sources :

Example 1 with HmRsStatus

use of org.takes.facets.hamcrest.HmRsStatus in project wring by yegor256.

the class TkAppTest method rendersAllPossibleUrls.

/**
 * App can render all possible URLs.
 * @throws Exception If some problem inside
 */
@Test
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
public void rendersAllPossibleUrls() throws Exception {
    final Take take = new TkApp(new FkBase());
    final String[] uris = { "/?x=y", "/robots.txt", "/xsl/layout.xsl", "/css/main.css", "/images/logo.svg", "/images/logo.png" };
    for (final String uri : uris) {
        MatcherAssert.assertThat(uri, take.act(new RqFake("INFO", uri)), Matchers.not(new HmRsStatus(HttpURLConnection.HTTP_NOT_FOUND)));
    }
}
Also used : Take(org.takes.Take) FkBase(io.wring.fake.FkBase) HmRsStatus(org.takes.facets.hamcrest.HmRsStatus) RqFake(org.takes.rq.RqFake) Test(org.junit.Test)

Aggregations

FkBase (io.wring.fake.FkBase)1 Test (org.junit.Test)1 Take (org.takes.Take)1 HmRsStatus (org.takes.facets.hamcrest.HmRsStatus)1 RqFake (org.takes.rq.RqFake)1