Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.OutputBuffer


     * {@link #createOutputBuffer}.
     *
     * @return a menu buffer for the testing
     */
    protected MenuBuffer createMenuBuffer() {
        OutputBuffer outputBuffer = createOutputBuffer();
        return new ConcreteMenuBuffer(outputBuffer, SeparatorRenderer.NULL);
    }
View Full Code Here


        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

     * This method tests the getText() method.  Since this is never supposed to
     * be null it tests the exception state as well as get/set combinations.
     */
    public void testGetText() {

        OutputBuffer testString;

        ConcreteMenuText testInstance = createTestClass(null);

        // Test invalid state
        try {
View Full Code Here

        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

        MenuText testMenuText = label.getText();
        assertNotNull("Menu text should not be null", testMenuText);
        assertEquals("The menu texts should be the same", text, testMenuText);

        // Test method
        OutputBuffer secondTestText = new DOMOutputBuffer();
        ConcreteMenuText secondText = new ConcreteMenuText(elementDetails);
        secondText.setText(secondTestText);

        ((ConcreteMenuLabel)label).setText(secondText);
        testMenuText = label.getText();
View Full Code Here

    /**
     * Tests that on subsequent calls of getCurrentBuffer() method the
     * same output buffer instance is returned
     */
    public void testGetCurrentBuffer(){
        OutputBuffer old = paneInstance.getCurrentBuffer(true);
        OutputBuffer exists = paneInstance.getCurrentBuffer(true);
        assertEquals("OutputBuffer must be the same", old, exists);
    }
View Full Code Here

     * Tests that calls to endCurrentBuffer followed by a getCurrentBuffer
     * returns different output buffer instances.
     */
   
    public void testEndCurrentBuffer(){
        OutputBuffer old = paneInstance.getCurrentBuffer();
        paneInstance.endCurrentBuffer();
        OutputBuffer exists = paneInstance.getCurrentBuffer();
        assertTrue("OutputBuffer must be different", old!=exists);
    }
View Full Code Here

                             String theContent,
                             NDimensionalIndex index) {

        PaneInstance paneInstance = (PaneInstance)
                deviceLayoutContext.getFormatInstance(pane, index);
        OutputBuffer buffer = paneInstance.getCurrentBuffer();
        buffer.writeText(theContent);
    }
View Full Code Here

    /**
     * Tests that the OutputBuffer returned is the same as the one supplied.
     */
    public void testOutputBufferSame() {
        OutputBuffer outputBuffer = createOutputBuffer();
        assertNotNull(outputBuffer);

        MenuBuffer buffer = createMenuBuffer(outputBuffer);
        assertNotNull(buffer);

View Full Code Here

     * @throws IllegalStateException If the OutputBuffer on the top of the stack
     * does not match the expected outputBuffer if specified.
     */
    public void popOutputBuffer(OutputBuffer expectedOutputBuffer) {

        OutputBuffer outputBuffer = (OutputBuffer) outputBufferStack.pop();
        if (expectedOutputBuffer != null && expectedOutputBuffer != outputBuffer) {
            throw new IllegalStateException("OUTPUT BUFFER STACK:"
                    + " Expected " + expectedOutputBuffer
                    + " popped " + outputBuffer);
        }
View Full Code Here

TOP

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

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.