Examples of baseURL()


Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            HttpRequest httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.contentType()).isEqualTo("text/plain; charset=UTF-8");
            assertThat(httpRequest.body().trim()).isEqualTo("hello");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.NOT_FOUND.getCode());
        } finally {
            server.stop();
        }
    }
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

                        .allowDirectoryListing().readonly().on("/test"))
                .build())
                .setRouterPath("/api").setPort(WebServers.findAvailablePort()).build();
        server.start();
        try {
            HttpRequest httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("[\n" +
                    "\"test.txt\"\n" +
                    "]");
        } finally {
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

                        .allowDirectoryListing().on("/test"))
                .build())
                .setRouterPath("/api").setPort(WebServers.findAvailablePort()).build();
        server.start();
        try {
            HttpRequest httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("[\n]");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

        try {
            HttpRequest httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("[\n]");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("bonjour");
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            assertThat(httpRequest.body().trim()).isEqualTo("[\n]");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("bonjour");

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("bonjour");

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("[\n" +
                    "\"test.txt\"\n" +
                    "]");
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("[\n" +
                    "\"test.txt\"\n" +
                    "]");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("hello");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.ACCEPTED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("hello");
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

                    "]");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test.txt").send("hello");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.ACCEPTED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("hello");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test2.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/test.txt");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isEqualTo("hello");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test2.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isIn("[\n" +
View Full Code Here

Examples of restx.server.simple.simple.SimpleWebServer.baseUrl()

            assertThat(httpRequest.body().trim()).isEqualTo("hello");

            httpRequest = HttpRequest.put(server.baseUrl() + "/api/test/test2.txt").send("bonjour");
            assertThat(httpRequest.code()).isEqualTo(HttpStatus.CREATED.getCode());

            httpRequest = HttpRequest.get(server.baseUrl() + "/api/test/");
            assertThat(httpRequest.code()).isEqualTo(200);
            assertThat(httpRequest.body().trim()).isIn("[\n" +
                    "\"test.txt\",\n" +
                    "\"test2.txt\"\n" +
                    "]", "[\n" +
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.