Package com.volantis.mcs.wbsax.io

Examples of com.volantis.mcs.wbsax.io.TestDebugProducer


     */
    public void testIgnoreElement() throws Exception {
        Node node = parseXml("<p><ignore><br/></ignore></p>");
       
        StringWriter out = new StringWriter();
        context.setContentHandler(new TestDebugProducer(out));
        outputter.addSpecialElementProcessor("ignore",
                new WBSAXIgnoreElementProcessor(context));
        node.accept(outputter);
        // Check for <p><br/></p>
        assertEquals("",
View Full Code Here


        buffer.closeElement(a);
        buffer.closeElement(da);
        buffer.closeElement(p);
       
        StringWriter out = new StringWriter();
        context.setContentHandler(new TestDebugProducer(out));
        outputter.addSpecialElementProcessor("da", processor);
        p.accept(outputter);
        // Check for <p><{opaque}><a href="[url]|{opaque}"/></{opaque}></p>
        if (attributeValue == null) {
            // default behaviour is just render it normally.
View Full Code Here

     */
    public void testAccesskeyAnnotationElement() throws Exception {
        Node node = parseXml("<p><ak><a accesskey=\"x\">x abc</a></ak></p>");
       
        StringWriter out = new StringWriter();
        context.setContentHandler(new TestDebugProducer(out));
        outputter.addSpecialElementProcessor("ak",
                new WBSAXAccesskeyAnnotationElementProcessor(context, true));
        node.accept(outputter);
        // Check for <p><a accesskey="{opaque}">{opaque}abc</a></p>
        // The access key opaque values created by above cannot be rendered
View Full Code Here

        accesskey = attributes.create("accesskey", null);
    }

    public void testEmptyAttributesNone() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check an element without attributes
        filter.startElement(e, false, false);
View Full Code Here

        assertEquals("", "[se:(c:e),false,false]", out.toString());
    }

    public void testEmptyAttributeOne() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check an element with a single attribute
        filter.startElement(e, true, false);
View Full Code Here

                out.toString());
    }

    public void testEmptyAttributesTwo() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check an element with two attributes
        filter.startElement(e, true, false);
View Full Code Here

                out.toString());
    }

    public void testEmptyAccesskeyNormal() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check one element with an normal accesskey element
        filter.startElement(e, true, false);
View Full Code Here

                "[ee]", out.toString());
    }

    public void testEmptyAccesskeyOpaque() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check one element with an opaque value accesskey element
        filter.startElement(e, true, false);
View Full Code Here

                out.toString());
    }

    public void testEmptyAccesskeyOpaqueRemovalOnly() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check 10 elements with an opaque value accesskey element
        // Do the first 9, they will work normally
View Full Code Here

        assertEquals("", result.toString(), out.toString());
    }

    public void testEmptyAccesskeyOpaqueRemovalFirst() throws WBSAXException {
        StringWriter out = new StringWriter();
        WBSAXContentHandler handler = new TestDebugProducer(out);
        AccesskeyWBSAXFilter filter = new AccesskeyWBSAXFilter(codec,
                handler, attributes);

        // Check 10 elements with an opaque value accesskey element
        // Do the first 9, they will work normally
View Full Code Here

TOP

Related Classes of com.volantis.mcs.wbsax.io.TestDebugProducer

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.