APISonar


org.mockserver.model.Body.Type.JSON

> org > mockserver > model > Body > Type > JSON
org APIs mockserver APIs model APIs Body APIs Type APIs JSON APIs

Example 1
public JsonBodyDTO(JsonBody jsonBody, Boolean not) {
        super(Body.Type.JSON, not, jsonBody.getContentType());
        this.json = jsonBody.getValue();
        this.matchType = jsonBody.getMatchType();
    }
Example 2
public void shouldHandleEmptyByteArray() {
        // given
        String body = "";

        // when
        JsonBody jsonBody = new JsonBodyDTO(new JsonBody(body)).buildObject();

        // then
        assertThat(jsonBody.getValue(), is(""));
        assertThat(jsonBody.getType(), is(Body.Type.JSON));
    }