Examples of retrievePolicy()


Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()


        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        ActivatedPolicy policy = retriever.retrievePolicy(projectMock, name);
        assertSame(policyMock, policy);
    }

    /**
     * Ensure that failing to retrieve a policy causes null to be returned.
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()

        // =====================================================================

        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        ActivatedPolicy policy = retriever.retrievePolicy(projectMock, name);
        assertNull(policy);
    }

    /**
     * Ensure that if the reader indicates that the project is different from
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()

        // =====================================================================

        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        ActivatedPolicy policy = retriever.retrievePolicy(globalProjectMock,
                name);
        assertSame(policyMock, policy);
    }

    /**
 
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()

        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        try {
            retriever.retrievePolicy(projectMock, name);
            fail("Did not detect invalid project in response");
        } catch (IllegalStateException e) {
            assertEquals("Response indicates policy is in " +
                    "{actualProjectMock} instead of {projectMock} but " +
                    "either it, or {projectMock} is not the global " +
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()

        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        try {
            retriever.retrievePolicy(projectMock, name);
            fail("Did not detect invalid project in response");
        } catch (IllegalStateException e) {
            assertEquals("Response indicates policy is in " +
                    "{actualProjectMock} instead of {globalProjectMock} but " +
                    "either it, or {projectMock} is not the global " +
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()


        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        ActivatedPolicy policy = retriever.retrievePolicy(projectMock, name);
        assertSame(policyMock, policy);
    }

    /**
     * Ensure that if a policy name is not project relative that even if it
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.ActivatedPolicyRetrieverImpl.retrievePolicy()

        ActivatedPolicyRetriever retriever = new ActivatedPolicyRetrieverImpl(
                activatorMock, projectManagerMock);

        ActivatedPolicy policy =
                retriever.retrievePolicy(projectMock, absoluteName);
        assertNull(policy);
    }
}
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.CachingActivatedPolicyRetriever.retrievePolicy()

        ActivatedPolicyRetriever retriever =
                new CachingActivatedPolicyRetriever(policyCache, retrieverMock);
        ActivatedPolicy actualPolicy;

        // Get the policy, this should invoke the underlying retriever.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);

        // Get the policy, this should get the policy from the cache.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.CachingActivatedPolicyRetriever.retrievePolicy()

        // Get the policy, this should invoke the underlying retriever.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);

        // Get the policy, this should get the policy from the cache.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);

        // Make sure that the object was stored in the cache.
        Object object = policyCache.retrieve(
                new ProjectSpecificKey(projectMock, projectRelativeName),
View Full Code Here

Examples of com.volantis.impl.mcs.runtime.policies.CachingActivatedPolicyRetriever.retrievePolicy()

        ActivatedPolicyRetriever retriever =
                new CachingActivatedPolicyRetriever(policyCache, retrieverMock);
        ActivatedPolicy actualPolicy;

        // Get the policy, this should invoke the underlying retriever.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);

        // Get the policy, this should get the policy from the cache.
        actualPolicy = retriever.retrievePolicy(projectMock, projectRelativeName);
        assertSame(policy, actualPolicy);
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.