Package com.github.restdriver.serverdriver.http

Examples of com.github.restdriver.serverdriver.http.Url


    public void getAllowsUrlObjects() {
        driver.addExpectation(
                onRequestTo("/").withParam("a", "b"),
                giveResponse("yooo", "text/plain").withStatus(404));
       
        Url url = url(baseUrl).withParam("a", "b");
       
        Response response = get(url);
       
        assertThat(response, hasStatusCode(404));
    }
View Full Code Here


     *
     * @param base The base, like "http://localhost"
     * @return The Url object
     */
    public static Url url(String base) {
        return new Url(base);
    }
View Full Code Here

    public static Url subscriptions(String checkId) {
        return check(checkId).withPath("/subscriptions");
    }
   
    public static Url subscriptions(Header checkLocation) {
        return new Url(checkLocation.getValue()).withPath("/subscriptions");
    }
View Full Code Here

    public static Url subscriptions(Header checkLocation) {
        return new Url(checkLocation.getValue()).withPath("/subscriptions");
    }
   
    private static Url baseUri() {
        return new Url("http://" + host() + ":" + port() + "/" + contextRoot()).withPath("api");
    }
View Full Code Here

TOP

Related Classes of com.github.restdriver.serverdriver.http.Url

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.