Search in sources :

Example 1 with Echo

use of act.handler.builtin.Echo in project actframework by actframework.

the class RouteTableRouterBuilderTest method payloadContainsBlank.

@Test
public void payloadContainsBlank() {
    addRouteMap("GET /magic_words echo: Hello world!");
    RequestHandler h = router.getInvoker(GET, "/magic_words", ctx);
    yes(h instanceof Echo);
    eq("Hello world!", ((Echo) h).readContent());
}
Also used : RequestHandler(act.handler.RequestHandler) Echo(act.handler.builtin.Echo) Test(org.junit.Test)

Aggregations

RequestHandler (act.handler.RequestHandler)1 Echo (act.handler.builtin.Echo)1 Test (org.junit.Test)1