Package com.volantis.mcs.context

Examples of com.volantis.mcs.context.TestMarinerPageContext


        super.setUp();
        //BasicConfigurator.configure();

        //  selector = new AcceptCharsetSelector(encManager);
        request = new HttpServletRequestStub();
        context = new TestMarinerPageContext();
        Map policyMap = new HashMap();
        final InternalDevice internalDevice =
            INTERNAL_DEVICE_FACTORY.createInternalDevice(
                new DefaultDevice("Test-Device", policyMap, null));
        context.setDevice(internalDevice);
View Full Code Here


                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
        RuntimeDeviceLayout runtimeDeviceLayout =
                runtimeDeviceLayout1;

        MarinerRequestContext requestContext = new TestMarinerRequestContext();
        context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        context.setDeviceLayout(runtimeDeviceLayout);

        DeviceLayoutContext deviceContext = new TestDeviceLayoutContext();
View Full Code Here


        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        TestMarinerPageContext testPageContext =
            (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);

        testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

        StringBuffer sb = new StringBuffer();
View Full Code Here

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_MENU_ORIENTATION,
                vertical ? MCSMenuOrientationKeywords.VERTICAL
                : MCSMenuOrientationKeywords.HORIZONTAL);

        TestMarinerPageContext testPageContext =
            (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);

        testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

        String type = (multiSelect) ? "checkbox" : "radio";
        String seperator = (vertical) ? "<br/>" : "\u00a0";
View Full Code Here

    public void testDoImage() throws Exception {
        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();

        // Needed to allow the call to getTextFromReference within doImage to work
        context = new TestMarinerPageContext();

        protocol.setMarinerPageContext(context);

        ImageAttributes attrs = new ImageAttributes();
        attrs.setSrc("http://www.volantis.com/my_image.jpg");
View Full Code Here

                new LiteralTextAssetReference("yes, yep, yeah");
       
        final TextAssetReference falseReference =
                new LiteralTextAssetReference("no, nope");
       
        TestMarinerPageContext context = new TestMarinerPageContext();
       
        ProtocolBuilder protocolBuilder = new ProtocolBuilder();
        VoiceXMLRoot protocol = (VoiceXMLRoot) protocolBuilder.build(
                new TestProtocolRegistry.TestVoiceXMLVersion1_0Factory(),
                internalDevice);
View Full Code Here

     * Test that the openSpan method behaves correctly when there is
     * a src attribute with a value it can use.
     */
    public void testOpenSpanSrcExpressionAttribute() throws Exception {
        final String text = "<xml>{an expression}</xml>";
        TestMarinerPageContext context = new TestMarinerPageContext() {
            public String getTextFromObject(Object object, int encoding) {
                return text;
            }
        };

View Full Code Here

     * a src attribute with a value it can use that evaluates to some
     * VoiceXML that is a prompt tag.
     */
    public void testOpenSpanSrcNestedPrompt() throws Exception {
        final String text = "<prompt>a voicexml prompt</prompt>";
        TestMarinerPageContext context = new TestMarinerPageContext() {
            public String getTextFromObject(Object object, int encoding) {
                return text;
            }
        };

View Full Code Here

    public void testDoMenuWithCSSEmulationStyle() throws Exception {
        final DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();
        testable.setCurrentBuffer(null, buffer);

        TestMarinerPageContext context = new TestMarinerPageContext();

        PaneInstance paneInstance = new TestPaneInstance() {
            public OutputBuffer getCurrentBuffer() {
                return buffer;
            }
        };
        context.setFormatInstance(paneInstance);

        TestDeviceLayoutContext layoutContext = new TestDeviceLayoutContext();
        context.pushDeviceLayoutContext(layoutContext);

        protocol.setMarinerPageContext(context);

        MenuAttributes menuAttrs = new MenuAttributes();
        menuAttrs.setStyles(StylesBuilder.getCompleteStyles(
View Full Code Here

     * processed.
     */
    public void testDoMenuItem() throws Exception {
        DOMOutputBuffer buffer = getNewDOMOutputBuffer();

        TestMarinerPageContext context = new TestMarinerPageContext();
        protocol.setMarinerPageContext(context);

        XMLReader reader = DOMUtilities.getReader();

        MenuItem item1 = new MenuItem();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.context.TestMarinerPageContext

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.