Package com.google.sitebricks.client

Examples of com.google.sitebricks.client.WebResponse


*/
@Test(suiteName = AcceptanceTest.SUITE)
public class RestfuWebServiceWithSubpaths2AcceptanceTest {

  public void shouldServiceTopLevelDynamicPath() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/" + TOPLEVEL)
        .transports(String.class)
        .over(Json.class)
        .get();

    assert TOPLEVEL.equals(response.toString());
  }
View Full Code Here


    assert TOPLEVEL.equals(response.toString());
  }

  public void shouldServiceFirstLevelStaticPath() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/subpath1")
        .transports(String.class)
        .over(Json.class)
        .post("");

    assert RestfulWebServiceWithSubpaths2.PATH_1.equals(response.toString()) : response.toString();
  }
View Full Code Here

    assert RestfulWebServiceWithSubpaths2.PATH_1.equals(response.toString()) : response.toString();
  }

  public void shouldServiceSameFirstLevelStaticPathWithPutMethod() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/subpath1")
        .transports(String.class)
        .over(Json.class)
        .put("");

    assert RestfulWebServiceWithSubpaths2.PATH_1_PUT.equals(response.toString())
        : response.toString();
  }
View Full Code Here

    assert RestfulWebServiceWithSubpaths2.PATH_1_PUT.equals(response.toString())
        : response.toString();
  }

  public void shouldServiceSameFirstLevelStaticPathWithDeleteMethod() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/subpath1")
        .transports(String.class)
        .over(Json.class)
        .delete();

    assert RestfulWebServiceWithSubpaths2.PATH_1_DELETE.equals(response.toString())
        : response.toString();
  }
View Full Code Here

    assert RestfulWebServiceWithSubpaths2.PATH_1_DELETE.equals(response.toString())
        : response.toString();
  }

  public void shouldServiceTwoLevelDynamicPath() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/more_junk")
        .transports(String.class)
        .over(Json.class)
        .post("");

    assert "junk_more_junk".equals(response.toString()) : response.toString();
  }
View Full Code Here

    assert "junk_more_junk".equals(response.toString()) : response.toString();
  }

  public void shouldServiceTwoLevelDynamicPathWithDeleteMethod() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/more_junk")
        .transports(String.class)
        .over(Json.class)
        .delete();

    assert "delete:junk_more_junk".equals(response.toString()) : response.toString();
  }
View Full Code Here

    assert "delete:junk_more_junk".equals(response.toString()) : response.toString();
  }

  public void shouldServiceThreeLevelDynamicPathWithDeleteMethod() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/more_junk/most_junk")
        .transports(String.class)
        .over(Json.class)
        .delete();

    assert "delete:junk_more_junk_most_junk".equals(response.toString()) : response.toString();
  }
View Full Code Here

    assert "delete:junk_more_junk_most_junk".equals(response.toString()) : response.toString();
  }

  public void shouldServiceThreeLevelDynamicPathWithPutMethod() {
    WebResponse response = createInjector()
        .getInstance(Web.class)
        .clientOf(AcceptanceTest.BASE_URL + "/superpath2/junk/more_junk/most_junk")
        .transports(String.class)
        .over(Json.class)
        .put("");

    assert "put:junk_more_junk_most_junk".equals(response.toString()) : response.toString();
  }
View Full Code Here

TOP

Related Classes of com.google.sitebricks.client.WebResponse

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.