Examples of TestDOMOutputBuffer


Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        DefaultAnchorMenuItemRenderer renderer =
                new DefaultAnchorMenuItemRenderer(
                        new TestDeprecatedAnchorOutput(), true, null);

        // Render.
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        renderer.open(buffer, item);

        AnchorAttributes attributes = (AnchorAttributes)PrivateAccessor.
                getField(renderer, "attributes");
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     * This will create the underlying menu and output buffer that this test
     * class manage on your behalf.
     */
    public TestMenuBufferLocator(SeparatorRenderer orientationRenderer) {

        outputBuffer = new TestDOMOutputBuffer();
        buffer = new ConcreteMenuBuffer(outputBuffer,
                                        orientationRenderer);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

    /**
     * Create an OutputBuffer that can be wrapped within a MenuBuffer.
     * @return The OutputBuffer.
     */
    protected OutputBuffer createOutputBuffer() {
        return new TestDOMOutputBuffer();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

    private void checkRendering(final StyleKeyword orientation,
                                FraglinkAttributes attrs,
            final String expectedLink, final String expectedChildText,
            final String expectedListText) throws Exception {

        TestDOMOutputBuffer linkDom = new TestDOMOutputBuffer();
        TestDOMOutputBuffer childTextDom = new TestDOMOutputBuffer();
        TestDOMOutputBuffer listTextDom = new TestDOMOutputBuffer();

        TestVDXMLFragmentLinkRendererContext context =
                new TestVDXMLFragmentLinkRendererContext(orientation, linkDom,
                        listTextDom);

        VDXMLFragmentLinkRenderer renderer = new VDXMLFragmentLinkRenderer(
                context);
        renderer.doFragmentLink(childTextDom, attrs);

        String link = DOMUtilities.toString(linkDom.getRoot());
        //System.out.println("link='" + link + "'");
        assertEquals("", expectedLink, link);

        String childText = DOMUtilities.toString(childTextDom.getRoot());
        //System.out.println("child text='" + childText + "'");
        assertEquals("", expectedChildText, childText);

        String listText = DOMUtilities.toString(listTextDom.getRoot());
        //System.out.println("list text='" + listText + "'");
        assertEquals("", expectedListText, listText);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        DefaultSpanMenuItemRenderer renderer =
                new DefaultSpanMenuItemRenderer(
                        new TestDeprecatedSpanOutput());

        // Render.
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        renderer.open(buffer, item);
        SpanAttributes attributes = (SpanAttributes)PrivateAccessor.
                getField(renderer, "attributes");
        assertNotNull("MCS Attributes should not be null", attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

    public VDXMLBlockTestCase() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        buffer = new TestDOMOutputBuffer();
        buffer.clear();
        vdStyleFactory = new VDXMLStyleFactory();
        writer = new CharArrayWriter();
        docWriter = new VDXMLDocumentWriter(new XMLDocumentWriter(writer));
        outputter = new DOMDocumentOutputter(
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     * This tests a successful rendering of the separator.  Successful means
     * that the image asset exists and is written out.
     */
    public void testSuccessfulRender() throws Exception {
        // Create test buffer locator
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();

        // Create the test items
        ImageAssetReference reference =
                entity.createImageAssetReference("separator");

View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

     * This tests a failed rendering of the separator.  Failed means that the
     * image asset url did not exist.
     */
    public void testFailedRender() throws Exception {
        // Create test buffer locator
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();

        // Create the test items
        ImageAssetReference reference =
                entity.createImageAssetReference(null);

View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        // Create expected
        String expected = DOMUtilities.provideDOMNormalizedString("<br/>");

        // Create the test buffer
        TestDOMOutputBuffer testBuffer = new TestDOMOutputBuffer();

        // Render using the test buffer
        renderer.render(testBuffer);

        // Extract the output from the rendering as a string.
        String actual = DOMUtilities.toString(testBuffer.getRoot());
        assertNotNull("The actual string should exist", actual);

        // Compare state and expected
        assertEquals("Strings should match: expected = \"" + expected +
                     "\" and actual = \"" + actual + "\"", expected, actual);
View Full Code Here

Examples of com.volantis.mcs.protocols.TestDOMOutputBuffer

        privateSetup();

        GridChildAttributes attributes = createGridChildAttributes(
                horizontal, vertical);
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();
        buffer.initialise();
        context.setCurrentOutputBuffer(buffer);
        protocol.openGridChild(buffer, attributes);
        return buffer;
    }
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.