Package org.webbitserver.stub

Examples of org.webbitserver.stub.StubHttpRequest.queryParams()


    }

    @Test
    public void extractsMultipleQueryParameters() throws Exception {
        HttpRequest req = new StubHttpRequest("http://host.com:8080/path?fish=cod&fruit=orange&fish=smørflyndre");
        assertEquals(asList("cod", "smørflyndre"), req.queryParams("fish"));
    }

    @Test
    public void alwaysReturnsEmptyListWhenThereIsNoQueryString() throws Exception {
        HttpRequest req = new StubHttpRequest("http://host.com:8080/path");
View Full Code Here


    }

    @Test
    public void alwaysReturnsEmptyListWhenThereIsNoQueryString() throws Exception {
        HttpRequest req = new StubHttpRequest("http://host.com:8080/path");
        assertEquals(EMPTY, req.queryParams("fish"));
        assertNull(req.queryParam("fish"));
    }

    @Test
    public void returnsEmptyListWhenThereIsNoSuchParameter() throws Exception {
View Full Code Here

    }

    @Test
    public void returnsEmptyListWhenThereIsNoSuchParameter() throws Exception {
        HttpRequest req = new StubHttpRequest("http://host.com:8080/path?poisson=cabillaud");
        assertEquals(EMPTY, req.queryParams("fish"));
        assertNull(req.queryParam("fish"));
    }

}
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.