Package com.github.tomakehurst.wiremock.testsupport

Examples of com.github.tomakehurst.wiremock.testsupport.WireMockResponse.statusCode()


                .withBodyFile("plain-example.txt")));
       
        WireMockResponse response = testClient.putWithBody("/match/this/body", "Blah...but not the rest", "text/plain");
        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
        response = testClient.putWithBody("/match/this/body", "@12345@...but not the rest", "text/plain");
        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
       
        response = testClient.putWithBody("/match/this/body", "BlahBlah@56565@Blah", "text/plain");
        assertThat(response.statusCode(), is(HTTP_OK));
  }
 
View Full Code Here


        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
        response = testClient.putWithBody("/match/this/body", "@12345@...but not the rest", "text/plain");
        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
       
        response = testClient.putWithBody("/match/this/body", "BlahBlah@56565@Blah", "text/plain");
        assertThat(response.statusCode(), is(HTTP_OK));
  }
 
  @Test
    public void matchingOnRequestBodyWithAContainsAndANegativeRegex() {
    stubFor(put(urlEqualTo("/match/this/body/too"))
View Full Code Here

                .willReturn(aResponse()
                .withStatus(HTTP_OK)
                .withBodyFile("plain-example.txt")));
       
        WireMockResponse response = testClient.putWithBody("/match/this/body/too", "Blah12345", "text/plain");
        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
       
        response = testClient.putWithBody("/match/this/body/too", "BlahBlahBlah", "text/plain");
        assertThat(response.statusCode(), is(HTTP_OK));
    }
 
View Full Code Here

       
        WireMockResponse response = testClient.putWithBody("/match/this/body/too", "Blah12345", "text/plain");
        assertThat(response.statusCode(), is(HTTP_NOT_FOUND));
       
        response = testClient.putWithBody("/match/this/body/too", "BlahBlahBlah", "text/plain");
        assertThat(response.statusCode(), is(HTTP_OK));
    }
 
  @Test
    public void matchingOnRequestBodyWithEqualTo() {
        stubFor(put(urlEqualTo("/match/this/body/too"))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.