Examples of statusCode()


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

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

        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

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

                .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

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

       
        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

Examples of com.jayway.restassured.response.Response.statusCode()

                .get("/operation/history/{hid}");


            jsonPath = response.jsonPath();
            status = jsonPath.getString("status");
            int code = response.statusCode();

            if (code==200 && (status.equals("Success") || status.equals("Failed"))) {
                done = true;
            } else {
                Thread.sleep(2000);
View Full Code Here

Examples of com.jayway.restassured.response.Response.statusCode()

                .formParam("username", username)
                .formParam("password", password)
                .formParam(OAuth2Constants.CLIENT_ID, "integration-tests")
                .post();

        if(response.statusCode() == HttpStatus.SC_OK) {
            try {
                AccessTokenResponse tokenResponse =
                        JsonSerialization.readValue(response.asString(), AccessTokenResponse.class);

                return new Session(getUnifiedPushServerUrl(), tokenResponse);
View Full Code Here

Examples of com.jayway.restassured.specification.ResponseSpecification.statusCode()

    }

    public Response sendAndExpect(Expectation... expectations) {
        LOGGER.debug("======= [START] {} ===========", actionSender.description);
        ResponseSpecification responseSpecification = this.requestSpecification.expect();
        responseSpecification.statusCode(actionSender.defaultStatusCode);
        for (Expectation expectation : expectations) {
            expectation.applyExpectation(responseSpecification);
        }
        Response response = actionSender.sendRequest(responseSpecification, url);
        LOGGER.debug("======= [END] {} ===========", actionSender.description);
View Full Code Here

Examples of com.spotify.docker.client.messages.ContainerExit.statusCode()

    } finally {
      unregister();
      this.containerId = Optional.absent();
    }

    log.info("container exited: {}: {}: {}", config, containerId, exit.statusCode());
    listener.exited(exit.statusCode());

    return exit.statusCode();
  }
View Full Code Here

Examples of io.netty.handler.codec.http.websocketx.CloseWebSocketFrame.statusCode()

        assertThat(((TextWebSocketFrame) readOutboundDiscardEmpty(ch)).content().toString(UTF_8), equalTo("o"));

        ch.writeInbound(new CloseWebSocketFrame(1000, "Normal close"));
        final CloseWebSocketFrame closeFrame = ch.readOutbound();
        assertThat(closeFrame.statusCode(), is(1000));
        assertThat(closeFrame.reasonText(), equalTo("Normal close"));
        verify(sockJsService).onOpen(any(SockJsSessionContext.class));
        verify(sockJsService).onClose();
    }
View Full Code Here

Examples of jodd.http.HttpResponse.statusCode()

  }

  @Test
  public void testRestAction2() {
    HttpResponse response = HttpRequest.get("localhost:8173/re/view2/g-321.html").send();
    assertEquals(302, response.statusCode());

    response = HttpRequest.get(response.header("location")).send();
    assertEquals("321", response.bodyText().trim());
  }
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.