Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.TransformingVisitor


    /**
     * Test the recursive nature of pushing a matching parent down.
     */
    public void testInlineStyleElementFixUp() throws Exception {
        TransformingVisitor visitor = createVisitor();
        String input =
                "<b>textA <strong>txt-2</strong> textE <strong>txt-5</strong> a <strong>txt-5</strong> </b>";

        XMLReader reader = DOMUtilities.getReader();
        Document dom = DOMUtilities.read(reader, input);
        visitor.transform(dom);

        String actual = DOMUtilities.toString(dom);

        String expected =
                "<b>textA<strong> txt-2 </strong>textE<strong> txt-5 </strong>a<strong> txt-5 </strong></b>";
View Full Code Here


    /**
     * Test the recursive nature of pushing a matching parent down.
     */
    public void testNestedInlineStyleElementFixUp() throws Exception {
        TransformingVisitor visitor = createVisitor();
        String input =
                "<b>textA <strong>txt-2 <strong>txt-3</strong> txt-4</strong> textE</b>";

        XMLReader reader = DOMUtilities.getReader();
        Document dom = DOMUtilities.read(reader, input);
        visitor.transform(dom);

        String actual = DOMUtilities.toString(dom);

        String expected =
                "<b>textA<strong> txt-2<strong> txt-3 </strong>txt-4 </strong>textE</b>";
View Full Code Here

    /**
     * Test the recursive nature of pushing a matching parent down.
     */
    public void testLinkElementFixUp() throws Exception {
        TransformingVisitor visitor = createVisitor();
        String input = "<b>textA <a>txt-2</a> textE</b>";

        XMLReader reader = DOMUtilities.getReader();
        Document dom = DOMUtilities.read(reader, input);
        visitor.transform(dom);

        String actual = DOMUtilities.toString(dom);

        String expected = "<b>textA <a> txt-2</a>" +
                VolantisProtocol.NBSP + " textE</b>";
View Full Code Here

    /**
     * Test the recursive nature of pushing a matching parent down.
     */
    public void testNestedLinkElementFixUp() throws Exception {
        TransformingVisitor visitor = createVisitor();
        String input = "<b>textA <a>txt-2 <a>txt-3</a> txt-4</a> textE</b>";

        XMLReader reader = DOMUtilities.getReader();
        Document dom = DOMUtilities.read(reader, input);
        visitor.transform(dom);

        String actual = DOMUtilities.toString(dom);

        String expected =
                "<b>textA <a> txt-2 <a> txt-3</a>" + VolantisProtocol.NBSP +
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.TransformingVisitor

Copyright © 2018 www.massapicom. 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.