Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer


                              selectedOptions[i]);
        }


        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();


        TestMarinerPageContext testPageContext =
                (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);
View Full Code Here


        group = helper.addOptionGroup(atts, "Group4""Prompt4");
        helper.addOption(group, "Caption2", "Prompt2""Value2", false);


        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

        StringBuffer sb = new StringBuffer();

        sb.append("<select ");
View Full Code Here

        helper.addOption(group, "Caption3", "Prompt3", "Value3",
                          selectedOtions[2]);

        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_SELECTION_LIST_STYLE,
                MCSSelectionListStyleKeywords.CONTROLS);
        propertyValues.setComputedValue(
View Full Code Here

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_MENU_ORIENTATION,
                MCSMenuOrientationKeywords.VERTICAL);

        // initialise the buffer
        final TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        testable.setCurrentBuffer(attributes.getEntryContainerInstance(), buffer);
        buffer.initialise();

        // select
        protocol.doSelectInput(attributes);

        // extract the result
        final Document document = domFactory.createDocument();
        Element root = buffer.getRoot();
        if (root.getName() == null) {
            root.setName("testRoot");
        }
        document.addNode(root);
        StyledDOMTester tester = new StyledDOMTester(true);
View Full Code Here

                    selectedOptions[i]);
        }


        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        TestMarinerPageContext testPageContext =
            (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);
View Full Code Here

        group = helper.addOptionGroup(atts, "Group4""Prompt4");
        helper.addOption(group, "Caption2", "Prompt2""Value2", false);


        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

        StringBuffer sb = new StringBuffer();

        sb.append("<select name=\"").append(atts.getName()).append("\">");
View Full Code Here

        helper.addOption(group, "Caption3", "Prompt3", "Value3",
                selectedOtions[2]);

        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_SELECTION_LIST_STYLE,
                MCSSelectionListStyleKeywords.CONTROLS);
        propertyValues.setComputedValue(
View Full Code Here

     */
    protected void doTestCreateEnclosingElement(
            PaneAttributes attributes,
            String expected)
            throws Exception {
        TestDOMOutputBuffer dom = new TestDOMOutputBuffer();
        Element element = dom.openStyledElement("td", attributes);

//        if (elementClassAttributes != null) {
//            element.setAttribute("class", elementClassAttributes);
//        }

        // Pane attributes can't be null, must contain a valid pane.
        if (attributes.getPane() == null) {
            attributes.setPane(new Pane(new CanvasLayout()));
        }

        protocol.createEnclosingElement(dom, attributes);

        String actual = DOMUtilities.toString(dom.getRoot());
        assertEquals("Result shouild match\n" +
                     "EXPECTED: " + expected + "\n" +
                     "ACTUAL  : " + actual + "\n", expected, actual);
    }
View Full Code Here

     */
    protected void doTestUseEnclosingTableCell(
            PaneAttributes attributes,
            String expected)
            throws Exception {
        TestDOMOutputBuffer dom = new TestDOMOutputBuffer();
        Element element = dom.openStyledElement("td", attributes);

//        if (elementClassAttributes != null) {
//            element.setAttribute("class", elementClassAttributes);
//        }

        // Pane attributes can't be null, must contain a valid pane.
        attributes.setPane(new Pane(new CanvasLayout()));

        protocol.useEnclosingTableCell(dom, attributes);

        String actual = DOMUtilities.toString(dom.getRoot());
        assertEquals("Result shouild match\n" +
                     "EXPECTED: " + expected + "\n" +
                     "ACTUAL  : " + actual + "\n", expected, actual);
        final MutablePropertyValues attributePropertyValues =
            attributes.getStyles().getPropertyValues();
View Full Code Here

    protected void doTestCheckPaneRendering(String elementName,
                                          PaneAttributes attributes,
                                          PaneRendering expected)
            throws Exception {

        TestDOMOutputBuffer dom = new TestDOMOutputBuffer();
        dom.openStyledElement(elementName, attributes);

        PaneRendering actual = protocol.checkPaneRendering(dom, attributes);
        assertEquals("Result shouild match\n" +
                     "EXPECTED: " + expected + "\n" +
                     "ACTUAL  : " + actual + "\n", expected, actual);
View Full Code Here

TOP

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

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.