Package com.volantis.mcs.protocols.hr

Examples of com.volantis.mcs.protocols.hr.TableAttrHREmulator


        String colorStyle_Expected =
            "<table align=\"center\" border=\"0\" cellpadding=\"0\" " +
                "cellspacing=\"0\" height=\"1\" width=\"100%\">" +
            "<tr><td bgcolor=\"red\" bordercolor=\"red\"/></tr></table>";

        HorizontalRuleEmulator emulator = new TableAttrHREmulator();

        /**
         * Test no style applied
         */
        DOMOutputBuffer domOutputBuffer = new DOMOutputBuffer() ;
        emulator.emulateHorizontalRule(
                domOutputBuffer, createHorizontalRuleAttributes(null));

        assertEquals("Incorrect Hr Emulation",noStyle_Expected,
                helper.render(domOutputBuffer.getRoot()));

        /**
         * Test width style applied
         */
        domOutputBuffer = new DOMOutputBuffer() ;
        emulator.emulateHorizontalRule(
                domOutputBuffer, createHorizontalRuleAttributes("width: 50%"));


        assertEquals("Incorrect Hr Emulation",widthStyle_Expected,
                helper.render(domOutputBuffer.getRoot()));

        /**
         * Test height style applied
         */
        domOutputBuffer = new DOMOutputBuffer() ;
        emulator.emulateHorizontalRule(domOutputBuffer,
                                    createHorizontalRuleAttributes("height: 5px"));


        assertEquals("Incorrect Hr Emulation",heightStyle_Expected,
                helper.render(domOutputBuffer.getRoot()));

        /**
         * Test colour style applied
         */
        domOutputBuffer = new DOMOutputBuffer() ;
        emulator.emulateHorizontalRule(domOutputBuffer,
                                    createHorizontalRuleAttributes("color: red"));


        assertEquals("Incorrect Hr Emulation",colorStyle_Expected,
                helper.render(domOutputBuffer.getRoot()));
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.hr.TableAttrHREmulator

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.