Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.DOMOutputBufferMock


        pageContext.expects.pushCanvasType(CanvasElementImpl.CANVAS_TYPE_MAIN);

        pageContext.expects.updateFragmentationState();

        final DOMOutputBufferMock anonymousBufferMock =
                new DOMOutputBufferMock("anonymousBufferMock", expectations);

        // Buffer for anonymous region pushed explicitly.
        formatInstance.expects.getCurrentBuffer().returns(anonymousBufferMock);

        pageContext.expects.pushOutputBuffer(anonymousBufferMock);
View Full Code Here


        customisation = new MenuModuleCustomisationMock("customisation",
                expectations);
        inserter = new InserterMock("inserter", expectations);
        renderer = new DefaultShortcutLabelRenderer(spanOutput, customisation,
                inserter);
        buffer = new DOMOutputBufferMock("buffer", expectations);
        item = new MenuItemMock("item", expectations);
        menu = new MenuMock("menu", expectations);
        shortcutValue = new TextAssetReferenceMock("shortcutValue", expectations);
        properties = new ShortcutPropertiesMock("properties", expectations);
        elementDetails = new ElementDetailsMock("elementDetails", expectations);
View Full Code Here

        // Create any mock objects whose constructors require expectations
        // to be set.
        control = new XFormsControlElementMock(
                "control", expectations, ELEMENT_TYPE, context);
        group = new XFGroupElementImplMock("group", expectations, context);
        outputBuffer = new DOMOutputBufferMock(
                "outputBuffer", expectations, domFactoryMock);

        // run test
        LabelStrategy labelStrategy = new LabelStrategy();
        labelStrategy.handleData(context);
View Full Code Here

            environmentContextMock).any();

        // Create any mock objects whose constructors require expectations
        // to be set.
        group = new XFGroupElementImplMock("group", expectations, context);
        outputBuffer = new DOMOutputBufferMock(
                "outputBuffer", expectations, domFactoryMock);
        context.expects.getCurrentElement().returns(group);
        outputBuffer.expects.getPCDATAValue().returns(CONTENT);
        pageContext.expects.popOutputBuffer(outputBuffer);
        model.expects.setGroupLabel(CONTENT);
View Full Code Here

            environmentContextMock).any();

        // Create any mock objects whose constructors require expectations
        // to be set.
        group = new XFGroupElementImplMock("group", expectations, context);
        outputBuffer = new DOMOutputBufferMock(
                "outputBuffer", expectations, domFactoryMock);
        context.expects.getCurrentElement().returns(group);
        // run test
        LabelStrategy labelStrategy = new LabelStrategy();
        labelStrategy.handleData(context);
View Full Code Here

        DOMFactoryMock domFactoryMock = new DOMFactoryMock(
                "domFactory", expectations);
       
        domFactoryMock.expects.createElement().returns(null);

        DOMOutputBufferMock outputBuffer = new DOMOutputBufferMock(
                "outputBuffer", expectations, domFactoryMock);
       
        protocolMock
            .expects.getOutputBufferFactory()
            .returns(outputBufferFactoryMock);
       
        pageCtxMock
            .fuzzy.pushDeviceLayoutContext(
                mockFactory.expectsInstanceOf(DeviceLayoutContext.class));

        RegionInstanceMock regionMock
            = new RegionInstanceMock("regionMock", expectations,
                    NDimensionalIndex.ZERO_DIMENSIONS);

        pageCtxMock
            .fuzzy.getFormatInstance(
                mockFactory.expectsInstanceOf(Format.class),
                NDimensionalIndex.ZERO_DIMENSIONS)
             .returns(regionMock);

        pageCtxMock
            .expects.pushContainerInstance(regionMock);

        regionMock
          .expects.getCurrentBuffer()
          .returns(outputBuffer).any();
       
        pageCtxMock
            .expects.pushOutputBuffer(outputBuffer);
       
       
       
        // Called during callOpenOnProtocol
        moduleMock = new WidgetModuleMock(
                "moduleMock", expectations);
        protocolMock
            .expects.getWidgetModule()
            .returns(moduleMock).fixed(2);       

        rendererMock = new WizardRendererMock(
                "rendererMock", expectations);
       
        moduleMock
            .expects.getWizardRenderer()
            .returns(rendererMock);
       
        rendererMock
            .fuzzy.renderOpen(
                protocolMock,
                mockFactory.expectsInstanceOf(WizardAttributes.class));
       
        // Called during callCloseOnProtocol
       
        moduleMock
            .fuzzy.getWidgetRenderer(
                    mockFactory.expectsInstanceOf(WizardAttributes.class))
            .returns(rendererMock);

        rendererMock
            .fuzzy.renderClose(
                protocolMock,
                mockFactory.expectsInstanceOf(WizardAttributes.class));

       
        // Called during doElementEnd
       
        pageCtxMock.expects.popContainerInstance(regionMock);                                        

        pageCtxMock
          .expects.popOutputBuffer(outputBuffer);
               
        DeviceLayoutContextMock deviceLayoutCtxMock =
            new DeviceLayoutContextMock("deviceLayoutCtxMock", expectations);

        pageCtxMock
            .expects.getDeviceLayoutContext()
            .returns(deviceLayoutCtxMock);

        pageCtxMock
            .expects.popDeviceLayoutContext()
            .returns(null);
       
             
        domFactoryMock.expects.createElement().returns(null);
        DOMOutputBufferMock currentBuffer = new DOMOutputBufferMock(
                "currentBuffer", expectations, domFactoryMock);

        
        containerInstanceMock
          .expects.getCurrentBuffer()
View Full Code Here

                        expectations);
        EmulatedXFormDescriptorMock fd =
                new EmulatedXFormDescriptorMock("fd", expectations);
        OutputBufferFactoryMock bufferFactory = new OutputBufferFactoryMock(
                "bufferFactory", expectations);
        DOMOutputBufferMock buffer =
                new DOMOutputBufferMock("buffer", expectations);

        // These expectations must be set before the DOMProtocolMock is created.
        psf.expects.getDOMFactory().returns(domFactory);
        configuration.expects.getValidationHelper().returns(null).any();
        DOMProtocolMock protocol = new DOMProtocolMock("protocol",
View Full Code Here

                        expectations);
        EmulatedXFormDescriptorMock fd =
                new EmulatedXFormDescriptorMock("fd", expectations);
        OutputBufferFactoryMock bufferFactory = new OutputBufferFactoryMock(
                "bufferFactory", expectations);
        DOMOutputBufferMock buffer =
                new DOMOutputBufferMock("buffer", expectations);

        // These expectations must be set before the DOMProtocolMock is created.
        psf.expects.getDOMFactory().returns(domFactory);
        configuration.expects.getValidationHelper().returns(null).any();
        DOMProtocolMock protocol = new DOMProtocolMock("protocol",
View Full Code Here

                expectations);

        contextMock = new DeviceLayoutContextMock("contextMock",
                expectations);

        bufferMock = new DOMOutputBufferMock("bufferMock", expectations);
    }
View Full Code Here

TOP

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

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.