@Override public String toXmlString() { return getDelegate().toXmlString(); }
/** * Asserts that the structure of the document and the builder are the same. */ public static <N, E extends N, T extends N> void assertStructureEquivalent( XmlStringBuilder expected, MutableDocument<N, E, T> doc) { String expectedStr = expected.getXmlString(); if (!DocCompare.equivalent(DocCompare.STRUCTURE, expectedStr, doc)) { String docStr = doc.toXmlString(); String message = "Expected [" + expectedStr + "], found [" + docStr + "]"; Assert.fail(message); } }
/** * Asserts that the content, both structure and annotations, of the document * and the builder are the same. */ public static <N, E extends N, T extends N> void assertEqual( XmlStringBuilder expected, MutableDocument<N, E, T> doc) { String expectedStr = expected.getXmlString(); if (!DocCompare.equivalent(DocCompare.ALL, expectedStr, doc)) { String docStr = doc.toXmlString(); String message = "Expected [" + expectedStr + "], found [" + docStr + "]"; Assert.fail(message); } }