Examples of ProtocolSupportFactory


Examples of com.volantis.mcs.protocols.ProtocolSupportFactory

    private void checkTransformation(String input, String expected,
                                     int deviceWidth,
                                     boolean convertPercentagesToPixels)
            throws Throwable {

        ProtocolSupportFactory factory = new DefaultProtocolSupportFactory();

        DOMProtocolMock protocolMock = new DOMProtocolMock(
                "protocolMock", expectations, factory, null);

        TransformationConfigurationMock transformationConfigurationMock =
                new TransformationConfigurationMock(
                        "transformationConfigurationMock", expectations);

        MarinerPageContextMock pageContextMock = new MarinerPageContextMock(
                "pageContextMock", expectations);

        InternalDeviceMock deviceMock = new InternalDeviceMock(
                "deviceMock", expectations);

        ProtocolConfigurationMock protocolConfigMock =
                new ProtocolConfigurationMock("protocolConfigMock",
                        expectations);

        // XHTML Mobile 1.0 doesn't support nested tables.
        protocolMock.expects.supportsNestedTables().returns(false).any();
        protocolMock.expects.getMarinerPageContext().returns(pageContextMock).any();
        protocolMock.expects.getDOMFactory().returns(factory.getDOMFactory()).any();
        protocolMock.expects.getProtocolConfiguration().returns(protocolConfigMock).any();

        pageContextMock.expects.getDevice().returns(deviceMock).any();

        deviceMock.expects.getPolicyValue(DevicePolicyConstants.PROTOCOL_CSS_EMULATE_WIDTH_PERCENTAGE_TABLE)
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.