APISonar


org.mockserver.model.Body.Type.XML

> org > mockserver > model > Body > Type > XML
org APIs mockserver APIs model APIs Body APIs Type APIs XML APIs

Example 1
public XmlBodyDTO(XmlBody xmlBody, Boolean not) {
        super(Body.Type.XML, not, xmlBody.getContentType());
        this.xml = xmlBody.getValue();
    }
Example 2
public void shouldReturnValuesSetInConstructor() {
        // when
        XmlBodyDTO xpathBody = new XmlBodyDTO(new XmlBody("some_body"));

        // then
        assertThat(xpathBody.getXml(), is("some_body"));
        assertThat(xpathBody.getType(), is(Body.Type.XML));
    }
Example 3
public void shouldBuildCorrectObject() {
        // when
        XmlBody xmlBody = new XmlBodyDTO(new XmlBody("some_body")).buildObject();

        // then
        assertThat(xmlBody.getValue(), is("some_body"));
        assertThat(xmlBody.getType(), is(Body.Type.XML));
    }