private Step addStep(final String key, final LinkRepresentation link, final JsonRepresentation body, final RestfulResponse<JsonRepresentation> jsonResp, final String error, final Exception ex) { final Step step = new Step(key, link, body, jsonResp, error, ex); steps.add(0, step); if (error != null) { if (jsonResp.getStatus().getFamily() != Family.SUCCESSFUL) { step.error = "response status code: " + jsonResp.getStatus(); } } return step; }
@Test public void unknownStatusCode() { final HttpStatusCode statusFor = HttpStatusCode.statusFor(600); assertThat(statusFor.getStatusCode(), is(600)); assertThat(statusFor.getFamily(), is(Family.OTHER)); }
@Test public void unknownStatusCode() { final HttpStatusCode statusFor = HttpStatusCode.statusFor(600); assertThat(statusFor.getStatusCode(), is(600)); assertThat(statusFor.getFamily(), is(Family.OTHER)); }