Package com.jetdrone.vertx.yoke.middleware

Examples of com.jetdrone.vertx.yoke.middleware.Static


    @Test
    public void testStaticSimple() {

        Yoke yoke = new Yoke(this);
        yoke.use(new Static("static"));

        new YokeTester(yoke).request("GET", "/dir1/file.1", new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(200, resp.getStatusCode());
View Full Code Here


    @Test
    public void testStaticSimpleNotFound() {

        Yoke yoke = new Yoke(this);
        yoke.use(new Static("static"));

        new YokeTester(yoke).request("GET", "/dir1/file.2", new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(404, resp.getStatusCode());
View Full Code Here

    @Test
    @Ignore
    // TODO: wait for bugfix from Vert.x 2.1.2
    public void testStaticEscape() {
        Yoke yoke = new Yoke(this);
        yoke.use(new Static("static"));

        new YokeTester(yoke).request("GET", "/dir1/new%20file.1", new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(200, resp.getStatusCode());
View Full Code Here

TOP

Related Classes of com.jetdrone.vertx.yoke.middleware.Static

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.