Examples of HorizontalRuleEmulator


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

                "border-bottom-style: solid; "+
                "border-bottom-width: 1px; "+
                "text-align: center; width: 100%'/>" +
                "<div style='margin-bottom: 2px'/>";

        HorizontalRuleEmulator emulator =
                new HorizontalRuleEmulatorWithBorderStylingOnMultipleDivs();

        /**
         * 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

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNull("No emulator should have been specified", emulator);
    }
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = new HorizontalRuleAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNull("No emulator should have been specified", emulator);

View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnHorizontalRule",
                emulator instanceof
                HorizontalRuleEmulatorWithBorderStylingOnHorizontalRule);
    }
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnDIV",
                emulator instanceof
                HorizontalRuleEmulatorWithBorderStylingOnDIV);
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnDIV",
                emulator instanceof
                HorizontalRuleEmulatorWithBorderStylingOnDIV);
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes();

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnDIV",
                emulator instanceof
                HorizontalRuleEmulatorWithBorderStylingOnDIV);
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes(
                "margin-bottom: 5px; margin-top: 5px; text-align: left");

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                true);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnMultipleDivs",
                emulator instanceof
                HorizontalRuleEmulatorWithBorderStylingOnMultipleDivs);
    }
View Full Code Here

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

        config.setDeviceCapabilityManager(builder.build());

        HorizontalRuleAttributes attrs = getHRAttributes(
                "margin-bottom: 5px; margin-top: 5px; text-align: left");

        HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
                false);

        assertNotNull("emulator should not be null", emulator);

        assertTrue("emulator was instnace of"+emulator.getClass().getName()+
                "and should be an instance of " +
                "HorizontalRuleEmulatorWithBorderStylingOnMultipleDivs",
                emulator instanceof
                TableAttrHREmulator);
    }
View Full Code Here

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

        String colorStyle_Expected =
        "<hr style='color: red; " +
                "border-top-style: solid; " +
                "border-top-width: 1px'/>";

        HorizontalRuleEmulator emulator =
                new HorizontalRuleEmulatorWithBorderStylingOnHorizontalRule();

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

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

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

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

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

        assertEquals("Incorrect Hr Emulation",colorStyle_Expected,
                helper.render(element));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.