Package com.volantis.mcs.runtime.policies

Examples of com.volantis.mcs.runtime.policies.RuntimePolicyReferenceMock


        assetResolverMock = new AssetResolverMock("assetResolverMock",
                expectations);

        policyFetcherMock = new PolicyFetcherMock("policyFetcherMock", expectations);

        referenceMock = new RuntimePolicyReferenceMock("referenceMock",
                expectations);

        rolloverMock = new ActivatedRolloverImagePolicyMock("rolloverMock",
                                expectations);
    }
View Full Code Here


            throws Exception {

        policyFetcherMock.expects.fetchPolicy(referenceMock)
                .returns(rolloverMock).any();

        final RuntimePolicyReferenceMock overReferenceMock =
                new RuntimePolicyReferenceMock("overReferenceMock",
                        expectations);

        rolloverMock.expects.getOverPolicy().returns(overReferenceMock).any();

        final RuntimePolicyReferenceMock normalReferenceMock =
                new RuntimePolicyReferenceMock("normalReferenceMock",
                        expectations);

        rolloverMock.expects.getNormalPolicy().returns(normalReferenceMock).any();

        // Create a test instance
View Full Code Here

        concretePolicyMock = new ConcretePolicyMock("concretePolicyMock", expectations);

        textAssetReferenceMock = new TextAssetReferenceMock("textAssetReferenceMock",
                                expectations);

        referenceMock = new RuntimePolicyReferenceMock("referenceMock",
                                expectations);

        variantMock = new VariantMock("variantMock", expectations);

        selectedVariantMock = new SelectedVariantMock("selectedVariantMock", expectations);
View Full Code Here

        super.setUp();

        assetResolverMock = new AssetResolverMock("assetResolverMock",
                expectations);

        policyReferenceMock = new RuntimePolicyReferenceMock(
                "policyReferenceMock", expectations);
    }
View Full Code Here

                        expectations);

        selectedVariantMock.expects.getPolicy()
                .returns(policyMock).any();

        final RuntimePolicyReferenceMock alternativeMock =
                new RuntimePolicyReferenceMock("alternativeMock",
                        expectations);

        policyMock.expects.getAlternatePolicy(PolicyType.TEXT)
                .returns(alternativeMock).any();
View Full Code Here

                        expectations);

        selectedVariantMock.expects.getPolicy()
                .returns(null).any();

        final RuntimePolicyReferenceMock alternativeMock =
                new RuntimePolicyReferenceMock("alternativeMock",
                        expectations);

        policyMock.expects.getAlternatePolicy(PolicyType.TEXT)
                .returns(alternativeMock).any();
View Full Code Here

        super.setUp();

        assetResolverMock = new AssetResolverMock("assetResolverMock",
                expectations);

        policyReferenceMock = new RuntimePolicyReferenceMock(
                "policyReferenceMock", expectations);

        fetcherMock = new PolicyFetcherMock("fetcherMock", expectations);

        defaultReference = new RolloverComponentReference(fetcherMock,
                assetResolverMock, policyReferenceMock);

        policyMock = new ActivatedRolloverImagePolicyMock("policyMock",
                                expectations);

        normalReferenceMock = new RuntimePolicyReferenceMock(
                "normalReferenceMock", expectations);

        overReferenceMock = new RuntimePolicyReferenceMock("overReferenceMock",
                                expectations);

        policyMock.expects.getNormalPolicy().returns(normalReferenceMock).any();
        policyMock.expects.getOverPolicy().returns(overReferenceMock).any();
    }
View Full Code Here

     * instance of an
     * {@link com.volantis.mcs.protocols.assets.ImageAssetReference}.
     */
    public void testGetTextFallback() throws Exception {

        final RuntimePolicyReferenceMock alternativeMock =
                new RuntimePolicyReferenceMock("alternativeMock",
                        expectations);

        fetcherMock.expects.fetchPolicy(policyReferenceMock)
                .returns(policyMock).any();

View Full Code Here

     * This tests getting the text fallback asset from the asset if the policy
     * is null.
     */
    public void testGetTextFallbackWhenPolicyIsNull() throws Exception {

        final RuntimePolicyReferenceMock alternativeMock =
                new RuntimePolicyReferenceMock("alternativeMock",
                        expectations);

        fetcherMock.expects.fetchPolicy(policyReferenceMock)
                .returns(null).any();

View Full Code Here

            new MarinerPageContextMock("MarinerPageContextMock", expectations);
        marinerPageContextMock.expects.getAssetResolver().returns(
            assetResolverMock).any();
        marinerPageContextMock.expects.getProtocol().returns(protocolMock).any();

        final RuntimePolicyReferenceMock runtimePolicyReferenceMock1 =
            new RuntimePolicyReferenceMock("RuntimePolicyReferenceMock1",
                expectations);
        runtimePolicyReferenceMock1.expects.getName().returns("name1").any();
        final RuntimePolicyReferenceMock runtimePolicyReferenceMock2 =
            new RuntimePolicyReferenceMock("RuntimePolicyReferenceMock2",
                expectations);
        runtimePolicyReferenceMock2.expects.getName().returns("name2").any();
        final RuntimePolicyReferenceMock runtimePolicyReferenceMock3 =
            new RuntimePolicyReferenceMock("RuntimePolicyReferenceMock3",
                expectations);
        runtimePolicyReferenceMock3.expects.getName().returns("name3").any();
        final RuntimePolicyReferenceMock runtimePolicyReferenceMock4 =
            new RuntimePolicyReferenceMock("RuntimePolicyReferenceMock4",
                expectations);
        runtimePolicyReferenceMock4.expects.getName().returns("name4").any();

        final ScriptLibraryManager slm = new ScriptLibraryManager(protocolMock);
        final VariantMock variantMock =
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.policies.RuntimePolicyReferenceMock

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.