Examples of TestDOMOutputBuffer


Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        VDXMLExternalLinkMenuItemRenderer renderer =
                new VDXMLExternalLinkMenuItemRenderer(externalLinkOutput,
                        new TestSpanMenuItemRendererPair());

        // Do a render.
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        boolean opened = renderer.open(buffer, item);

        // Ensure that nothing happened.
        assertFalse("", opened);

        // Double check that nothing was in the output.
        String actualExternal = externalLinkOutput.getResult();
        //System.out.println(actualExternal);
        String actualNormal = DOMUtilities.toString(buffer.getRoot());
        //System.out.println(actualNormal);

        // Assemble the expected value (empty string as nothing should happen.
        String expected = "";
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        }

        String content = "test menu item";

        // Create the test DOM for the text buffer
        TestDOMOutputBuffer menuText = new TestDOMOutputBuffer();
        menuText.appendEncoded(content);

        // Create the test text, label, and then the menu item
        final ConcreteMenuText text = new ConcreteMenuText(elementDetails);
        text.setText(menuText);
        final ConcreteMenuLabel label = new ConcreteMenuLabel(
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        pageContext.pushRequestContext(requestContext);

        protocol.setMarinerPageContext(pageContext);
        pageHead = new PageHead();
        testable.setPageHead(pageHead);
        buffer = new TestDOMOutputBuffer();
        pageContext.setCurrentOutputBuffer(buffer);
        testable.setCurrentBuffer(null, buffer);

        // Add in a protocols configuration so that action input fields do
        // not have exceptions for dollar encoding.
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     */
    public void testAddPostFieldClientVariableName() throws Exception {
        privateSetUp();
        XFImplicitAttributes attributes = new XFImplicitAttributes();

        buffer = new TestDOMOutputBuffer();
        buffer.initialise();
        document = domFactory.createDocument();

        attributes.setName("name");
        attributes.setClientVariableName("clientVariableName");
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

             throws Exception {
        privateSetUp();
        XFImplicitAttributes attributes = new XFImplicitAttributes();

        // Test that clientVariableName takes precedence over value
        buffer = new TestDOMOutputBuffer();
        buffer.initialise();
        document = domFactory.createDocument();

        attributes.setName("name");
        attributes.setValue("value");
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     * is invoked by the default Output Buffer Resolver.
     *
     * @return an Output Buffer appropriate to the testing
     */
    protected OutputBuffer createOutputBufferImpl() {
        return new TestDOMOutputBuffer();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     *                   a menu item
     */
    protected void createMenuItem(MenuModelBuilder builder,
                                  String text,
                                  FormatReference pane) throws Exception{
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();

        buffer.appendEncoded(text);

        builder.startMenuItem();

        builder.setHref(new LiteralLinkAssetReference("href"));

View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

    public static String getRenderOutputAsString(MenuItemBracketingRenderer renderer,
                                                 MenuItem item,
                                                 String content)
            throws RendererException {

        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        if (renderer.open(buffer, item)) {

            buffer.writeText(content);

            renderer.close(buffer, item);
        }

        // Extract the output from the menu item rendering as a string.
        return DOMUtilities.toString(buffer.getRoot());
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     */
    public static String getRenderOutputAsString(MenuItemBracketingRenderer renderer,
                                                 MenuItem item)
            throws RendererException {

        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        if (renderer.open(buffer, item)) {

            buffer.transferContentsFrom(item.getLabel().getText().getText());

            renderer.close(buffer, item);
        }

        // Extract the output from the menu item rendering as a string.
        return DOMUtilities.toString(buffer.getRoot());
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        builder.setNormalImageURL(new LiteralImageAssetReference("normal.gif"));
        builder.setOverImageURL(new LiteralImageAssetReference("over.gif"));
        builder.endIcon();
        builder.startText();

        OutputBuffer buffer = new TestDOMOutputBuffer();
        buffer.writeText("text");

        builder.setText(buffer);
        builder.endText();
        builder.endLabel();
        builder.setHref(new LiteralLinkAssetReference("href.xml"));
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.