Package org.doctester.testbrowser

Examples of org.doctester.testbrowser.Response


    }
   
    @Test
    public void testGetHelloWorldJson() {
   
        Response response = makeRequest(
                Request.GET().url(
                        testServerUrl().path(URL_HELLO_WORLD_JSON)));

        ApplicationController.SimplePojo simplePojo
                = response.payloadJsonAs(ApplicationController.SimplePojo.class);
       
        assertThat(simplePojo.content, CoreMatchers.equalTo("Hello World! Hello Json!"));

   
    }
View Full Code Here


       
        sayNextSection("Retrieving articles for a user (Json)");
       
        say("Retrieving all articles of a user is a GET request to " + GET_ARTICLES_URL);
       
        Response response = sayAndMakeRequest(
                Request.GET().url(
                        testServerUrl().path(GET_ARTICLES_URL.replace("{username}", "bob@gmail.com"))));

        ArticlesDto articlesDto = getGsonWithLongToDateParsing().fromJson(response.payload, ArticlesDto.class);
View Full Code Here

    Injector injector;

    @Test
    public void testGet() {

        Response response = makeRequest(Request.GET().url(
                testServerUrl().path("/base/middle/app/get")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("get works."));

    }
View Full Code Here

    }

    @Test
    public void testGet012() {

        Response response = makeRequest(Request.GET().url(
                testServerUrl().path("/0/1/2/get")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("get works."));

    }
View Full Code Here

    }

    @Test
    public void testPut() {

        Response response = makeRequest(Request.PUT().url(
                testServerUrl().path("/base/middle/app/put")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("put works."));

    }
View Full Code Here

    }

    @Test
    public void testPut012() {

        Response response = makeRequest(Request.PUT().url(
                testServerUrl().path("/0/1/2/put")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("put works."));

    }
View Full Code Here

    }

    @Test
    public void testPost() {

        Response response = makeRequest(Request.POST().url(
                testServerUrl().path("/base/middle/app/post")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("post works."));

    }
View Full Code Here

    }

    @Test
    public void testPost012() {

        Response response = makeRequest(Request.POST().url(
                testServerUrl().path("/0/1/2/post")));

        Assert.assertThat(response.payload, CoreMatchers.equalTo("post works."));

    }
View Full Code Here

    }

    @Test
    public void testDelete() {

        Response response = makeRequest(Request.DELETE().url(
                testServerUrl().path("/base/middle/app/delete")));

        Assert.assertThat(response.payload,
                CoreMatchers.equalTo("delete works."));
View Full Code Here

    }

    @Test
    public void testDelete012() {

        Response response = makeRequest(Request.DELETE().url(
                testServerUrl().path("/0/1/2/delete")));

        Assert.assertThat(response.payload,
                CoreMatchers.equalTo("delete works."));
View Full Code Here

TOP

Related Classes of org.doctester.testbrowser.Response

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.