Package litmus.functional

Examples of litmus.functional.Request


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

TOP

Related Classes of litmus.functional.Request

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.