Examples of MockJavaAction


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

Examples of javaguide.testhelpers.MockJavaAction

        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

Examples of javaguide.testhelpers.MockJavaAction

    }

    @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
Copyright © 2018 www.massapi.com. 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.