Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.VolantisProtocol


    public void testWriteOpenMontage() throws Exception {
        final MontageAttributes attributes =
                (MontageAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(MontageAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeOpenMontage(attributes);
                protocol.writeCloseMontage(attributes);
            }
        };
        String expecting = getExpectedWriteOpenMontageResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here


    /**
     * This method tests the method public void writeProtocolString ( )
     * for the com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void notestWriteProtocolString() throws Exception {
        final VolantisProtocol protocol = getProtocol();

        DOMFactory domFactory = DOMFactory.getDefaultInstance();
        final Document document = domFactory.createDocument();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() {
                protocol.writeProtocolString(document);
            }
        };
        String expecting = getExpectedWriteProtocolStringResult();
        ProtocolIntegrationTestHelper.doTestWithoutUsingDOMComparison(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    public void testWriteOpenStyle() throws Exception {
        final StyleAttributes attributes =
                (StyleAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(StyleAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() {
                protocol.writeOpenStyle(getOutputBuffer(protocol), attributes);
                protocol.writeCloseStyle(getOutputBuffer(protocol), attributes);
            }
        };
        String expecting = getExpectedWriteOpenStyleResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    public void testWriteOpenSlide() throws Exception {
        final SlideAttributes attributes =
                (SlideAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(SlideAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() {
                protocol.writeOpenSlide(attributes);
                protocol.writeCloseSlide(attributes);
            }
        };
        String expecting = getExpectedWriteOpenSlideResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    public void testWriteOpenSpatialFormatIterator() throws Exception {
        final SpatialFormatIteratorAttributes attributes =
                (SpatialFormatIteratorAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(SpatialFormatIteratorAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeOpenSpatialFormatIterator(attributes);
                protocol.writeCloseSpatialFormatIterator(attributes);
            }
        };
        String expecting = getExpectedWriteOpenSpatialFormatIteratorResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    // javadoc inherited
    protected VolantisProtocol getProtocol() {
        // todo: better: make this work with the test version
        ProtocolBuilder protocolBuilder = new ProtocolBuilder();
        VolantisProtocol protocol = protocolBuilder.build(
                new ProtocolRegistry.VoiceXMLVersion1_0Factory(),
                internalDevice);
       
        return protocol;
    }
View Full Code Here

    // Javadoc inherited
    protected XDIMEResult callOpenOnProtocol(
            XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {

        VolantisProtocol protocol = getProtocol(context);

        try {
            protocol.writeOpenUnorderedList(
                (UnorderedListAttributes)protocolAttributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);

            throw new XDIMEException(exceptionLocalizer.format(
View Full Code Here

    }

    // Javadoc inherited
    protected void callCloseOnProtocol(XDIMEContextInternal context) {

        VolantisProtocol protocol = getProtocol(context);

        protocol.writeCloseUnorderedList(
            (UnorderedListAttributes)protocolAttributes);
    }
View Full Code Here

    // Javadoc inherited
    protected XDIMEResult callOpenOnProtocol(
            XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {

        VolantisProtocol protocol = getProtocol(context);

        try {
            protocol.writeOpenHeading3((HeadingAttributes)protocolAttributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);

            throw new XDIMEException(exceptionLocalizer.format(
                "rendering-error", getTagName()), e);
View Full Code Here

    }

    // Javadoc inherited
    protected void callCloseOnProtocol(XDIMEContextInternal context) {

        VolantisProtocol protocol = getProtocol(context);

        protocol.writeCloseHeading3((HeadingAttributes)protocolAttributes);
    }
View Full Code Here

TOP

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

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.