use of org.apache.axiom.om.OMComment in project webservices-axiom by apache.
the class TestCreateOMCommentWithoutParent method runTest.
@Override
protected void runTest() throws Throwable {
OMComment comment = metaFactory.getOMFactory().createOMComment(null, "my comment");
assertNull(comment.getParent());
assertEquals("my comment", comment.getValue());
}
use of org.apache.axiom.om.OMComment in project webservices-axiom by apache.
the class TestCommentInEpilog method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope envelope = OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, new StringReader(soapFactory.getDefaultEnvelope() + "<!--comment-->")).getSOAPEnvelope();
OMNode sibling = envelope.getNextOMSibling();
assertTrue(sibling instanceof OMComment);
}
use of org.apache.axiom.om.OMComment in project webservices-axiom by apache.
the class TestCommentInProlog method runTest.
@Override
protected void runTest() throws Throwable {
SOAPMessage message = SOAPSampleSet.COMMENT_IN_PROLOG.getMessage(spec).getAdapter(SOAPSampleAdapter.class).getSOAPMessage(metaFactory);
OMNode firstChild = message.getFirstOMChild();
assertTrue(firstChild instanceof OMComment);
}
Aggregations