Package com.jetdrone.vertx.yoke.test

Examples of com.jetdrone.vertx.yoke.test.YokeTester.request()


            }
        });

        final YokeTester yokeAssert = new YokeTester(yoke);

        yokeAssert.request("GET", "/", new Handler<Response>() {
            @Override
            public void handle(Response response) {
                assertEquals("OK", response.body.toString());
                testComplete();
            }
View Full Code Here


            });
        }});

        final YokeTester yokeAssert = new YokeTester(yoke);

        yokeAssert.request("GET", "/", new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                // start: there is no cookie
                assertEquals(200, resp.getStatusCode());
                String nocookie = resp.headers.get("set-cookie");
View Full Code Here

                assertEquals(200, resp.getStatusCode());
                String nocookie = resp.headers.get("set-cookie");
                assertNull(nocookie);

                // create session
                yokeAssert.request("GET", "/new", new Handler<Response>() {
                    @Override
                    public void handle(Response resp) {
                        // start: there is a cookie
                        assertEquals(200, resp.getStatusCode());
                        final String cookie = resp.headers.get("set-cookie");
View Full Code Here

                        // make a new request to / with cookie should return again the same cookie
                        MultiMap headers = new CaseInsensitiveMultiMap();
                        headers.add("cookie", cookie);

                        yokeAssert.request("GET", "/", headers, new Handler<Response>() {
                            @Override
                            public void handle(Response resp) {
                                // the session should be the same, so no set-cookie
                                assertEquals(200, resp.getStatusCode());
                                String nocookie = resp.headers.get("set-cookie");
View Full Code Here

                                // end the session
                                MultiMap headers = new CaseInsensitiveMultiMap();
                                headers.add("cookie", cookie);

                                yokeAssert.request("GET", "/delete", headers, new Handler<Response>() {
                                    @Override
                                    public void handle(Response resp) {
                                        // there should be a set-cookie with maxAge 0
                                        assertEquals(200, resp.getStatusCode());
                                        String cookie = resp.headers.get("set-cookie");
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.