Package litmus.functional

Examples of litmus.functional.Response


    assertThat(get("/flash/oneFlashParam").getFlashParam("foo")).isEqualTo("bar");
  }

  @Test
  public void multipleFlashScopeVars() {
    Response response = get("/flash/twoFlashParams");
    assertThat(response).hasFlashParam("foo", "message1");
    assertThat(response).hasFlashParam("bar", "message2");
  }
View Full Code Here


public class RequestParametersExample extends FunctionalTest {

    @Test
    public void parametersThatAreSpecifiedForAGETArePassedInTheUrl() {
        Response response = new Request("/parameters").with("parameter", "value1").get();
        assertThat(response.getText()).isEqualTo("Parameter passed: value1");
    }
View Full Code Here

        assertThat(response.getText()).isEqualTo("Parameter passed: value1");
    }

    @Test
    public void parametersThatAreSpecifiedForAGETareUrlEncoded() {
        Response response = new Request("/parameters").with("parameter", "value 1").get();
        assertThat(response.getText()).isEqualTo("Parameter passed: value 1");
    }
View Full Code Here

        assertThat(response.getText()).isEqualTo("Parameter passed: value 1");
    }

    @Test
    public void parametersThatAreSpecifiedForAPOSTArePassedInTheBody() {
        Response response = new Request("/parameters").with("parameter", "value1").post();
        assertThat(response.getText()).isEqualTo("Parameter passed: value1");
    }
View Full Code Here

        assertThat(response.getText()).isEqualTo("Parameter passed: value1");
    }

    @Test
    public void worksWithMultipleParametersToo(){
        Response response = new Request("/paramtersMultipleParams").with("parameter1", "value1").with("parameter2", "value 2").get();
        assertThat(response.getText()).isEqualTo("Parameters: (parameter1, value1), (parameter2, value 2)");
    }
View Full Code Here

public class CookiesExample extends FunctionalTest {

  @Test
  public void hasCookie() {
    Response response = get("/cookies/foo");
    assertThat(response).hasCookie("foo");
  }
View Full Code Here

    assertThat(response).hasCookie("foo");
  }

  @Test
  public void hasCookieWithValue() {
    Response response = get("/cookies/foo");
    assertThat(response).hasCookieValue("foo", "bar");
  }
View Full Code Here

    assertThat(response).hasCookieValue("foo", "bar");
  }

  @Test
  public void doesntHaveCookie() {
    Response response = get("/cookies/foo");
    assertThat(response).hasNoCookie("unexistingCookie");
  }
View Full Code Here

TOP

Related Classes of litmus.functional.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.