Examples of BinaryBody


Examples of org.mockserver.model.BinaryBody

    public void shouldReturnValueSetInConstructor() {
        // given
        byte[] body = DatatypeConverter.parseBase64Binary("some_body");

        // when
        BinaryBodyDTO binaryBody = new BinaryBodyDTO(new BinaryBody(body));

        // then
        assertThat(binaryBody.getValue(), is(DatatypeConverter.printBase64Binary(body)));
        assertThat(binaryBody.getType(), is(Body.Type.BINARY));
    }
View Full Code Here

Examples of org.mockserver.model.BinaryBody

    public void shouldBuildCorrectObject() {
        // given
        byte[] body = DatatypeConverter.parseBase64Binary("some_body");

        // when
        BinaryBody binaryBody = new BinaryBodyDTO(new BinaryBody(body)).buildObject();

        // then
        assertThat(binaryBody.getValue(), is(body));
        assertThat(binaryBody.getType(), is(Body.Type.BINARY));
    }
View Full Code Here

Examples of org.mockserver.model.BinaryBody

    public String getValue() {
        return value;
    }

    public BinaryBody buildObject() {
        return new BinaryBody(DatatypeConverter.parseBase64Binary(value));
    }
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.