Examples of TestPaneInstance


Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "background-color: #ff0000"));
        attributes.setPane(pane);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);
        Element parent = dom.openStyledElement("td", attributes);
        protocol.openPane(dom, attributes);

        Element element = dom.getCurrentElement();
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "background-color: #ff0000"));
        attributes.setPane(pane);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);
        parent = dom.openStyledElement("td", attributes);
        parent.setAttribute("id", "parent");
        attributes.setId("child");
        protocol.openPane(dom, attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        pane.setHeight(null);
        pane.setWidth(null);
        pane.setHorizontalAlignment(null);
        pane.setVerticalAlignment(null);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);

        // Make the test framework behave as if no style class is required!
//        context.setStyleClassName(null);
        testable.setPageHead(new PageHead());
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        canvasLayout = new CanvasLayout();

        pane = new Pane(canvasLayout);
        pane.setName("TestPane");               
       
        paneInstance = new TestPaneInstance();
        paneInstance.setFormat(pane);
       
        deviceLayoutContext = new TestDeviceLayoutContext();
        deviceLayoutContext.setFormatInstance(pane,
                NDimensionalIndex.ZERO_DIMENSIONS, paneInstance);
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        deviceContext.setDeviceLayout(runtimeDeviceLayout);
        context.pushDeviceLayoutContext(deviceContext);
        ContextInternals.setMarinerPageContext(requestContext, context);
        protocol.setMarinerPageContext(context);

        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setStyleClass("fred");
        context.setFormatInstance(paneInstance);
       
        PageHead head = new PageHead();
        testable.setPageHead(head);
        testable.setStyleSheetRenderer(CSSStyleSheetRenderer.getSingleton());
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

                new Pane(new CanvasLayout());
        final String pane = "testPane";
        testPane.setName(pane);
        pageContext.addPaneMapping(testPane);

        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setFormat(testPane);
        TestDeviceLayoutContext deviceLayoutContext =
                new TestDeviceLayoutContext();
        deviceLayoutContext.setFormatInstance(testPane,
                NDimensionalIndex.ZERO_DIMENSIONS, paneInstance);
        pageContext.pushDeviceLayoutContext(deviceLayoutContext);
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

    public void testElementStart()
            throws Exception {

        initialiseContexts();
        pageContext.pushElement(createDummyFormElement(pane));
        TestPaneInstance paneContext = new TestPaneInstance();
        paneContext.setFormat(pane);
        paneContext.setDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneContext);
        assertEquals("Wrong code returned by elementStart",
                     PAPIElement.PROCESS_ELEMENT_BODY,
                     element.elementStart(requestContext, attributes));

        // check to see that the XFFomElements Pane has been pushed onto
        // the Page Contexts pane stack
//        assertEquals("Pane Stack size should be 1",
//                     pageContext.getPaneStack().size(), 1);

        Pane currentPane = pageContext.getCurrentPane();
        assertSame("Current pane should be " + currentPane, currentPane, pane);


        // check to see that pageContext is using the corrent output buffer.
//        assertEquals("OutputBuffer stack size should be 1",
//                     pageContext.getBufferStack().size(), 1);

        assertSame("Current outputBuffer should be " + outputBuffer,
                   pageContext.getCurrentOutputBuffer(), outputBuffer);


        initialiseContexts();
        pageContext.pushElement(createDummyFormElement(pane));
        Pane namedPane = new Pane(canvasLayout);
        namedPane.setName("NamedPane");
        attributes.setPane(namedPane.getName());
        pageContext.addPaneMapping(namedPane);
        paneContext = new TestPaneInstance();
        paneContext.setFormat(namedPane);
        paneContext.setDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneContext);
        element.elementStart(requestContext, attributes);

        currentPane = pageContext.getCurrentPane();
        assertSame("Current pane should be " + currentPane,
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        deviceContext.setDeviceLayout(runtimeDeviceLayout);
        context.pushDeviceLayoutContext(deviceContext);
        ContextInternals.setMarinerPageContext(requestContext, context);
        protocol.setMarinerPageContext(context);

        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setStyleClass("fred");
        context.setFormatInstance(paneInstance);
       
        PageHead head = new PageHead();
        testable.setPageHead(head);
        testable.setStyleSheetRenderer(CSSStyleSheetRenderer.getSingleton());
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

    public void testElementEnd()
            throws Exception {

        initialiseContexts();
        pageContext.pushElement(createDummyFormElement(pane));
        TestPaneInstance paneContext = new TestPaneInstance();
        paneContext.setFormat(pane);
        paneContext.setDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneContext);
        element.elementStart(requestContext, attributes);

        element.elementEnd(requestContext, attributes);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.TestPaneInstance

        pageContext.setCurrentPane(testPane);

        TestDeviceLayoutContext deviceLayoutContext =
                new TestDeviceLayoutContext();

        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setFormat(testPane);
        paneInstance.setDeviceLayoutContext(deviceLayoutContext);

        deviceLayoutContext.setFormatInstance(testPane,
                NDimensionalIndex.ZERO_DIMENSIONS, paneInstance);
        pageContext.pushDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneInstance);
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.