Package javaguide.testhelpers

Examples of javaguide.testhelpers.MockJavaAction


        assertThat(message, equalTo("Hello, world"));
    }

    @Test
    public void async() throws Exception {
        Result result = MockJavaActionHelper.call(new MockJavaAction() {
            public Promise<Result> index() {
                return new javaguide.akka.async.Application().index();
            }
        }, Helpers.fakeRequest());
        assertThat(Helpers.contentAsString(result), equalTo("Got 2"));
View Full Code Here


        ActorSystem.create("conf", config).shutdown();
    }

    @Test
    public void async() throws Exception {
        Result result = MockJavaActionHelper.call(new MockJavaAction() {
            public Promise<Result> index() {
                return new javaguide.akka.async.Application().index();
            }
        }, Helpers.fakeRequest());
        assertThat(Helpers.contentAsString(result), equalTo("Got 2"));
View Full Code Here

    }

    @Test
    public void templates() {
        String token = crypto().generateSignedToken();
        String body = contentAsString(MockJavaActionHelper.call(new MockJavaAction() {
            public Result index() {
                return ok(javaguide.forms.html.csrf.render());
            }
        }, fakeRequest("GET", "/").withSession("csrfToken", token)));
View Full Code Here

TOP

Related Classes of javaguide.testhelpers.MockJavaAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.