Package com.jayway.restassured.config

Examples of com.jayway.restassured.config.RedirectConfig


    public void whenConsumingSimillarResourceName_thenRedirectedToCorrectResourceName() {
        final String simillarUriOfResource = getUri().substring(0, getUri().length() - 1);
        final Pair<String, String> readCredentials = getApi().getReadCredentials();
        final RequestSpecification givenAuthenticated = auth.givenBasicAuthenticated(readCredentials.getLeft(), readCredentials.getRight());
        final RequestSpecification readReq = givenAuthenticated.header(HttpHeaders.ACCEPT, marshaller.getMime());
        final RequestSpecification customRequest = readReq.config(new RestAssuredConfig().redirect(new RedirectConfig().followRedirects(false)));
        final Response responseOfSimillarUri = getApi().findOneByUriAsResponse(simillarUriOfResource, customRequest);
        assertThat(responseOfSimillarUri.getStatusCode(), is(301));
    }
View Full Code Here

TOP

Related Classes of com.jayway.restassured.config.RedirectConfig

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.