Examples of MockContext


Examples of org.apache.tapestry.test.mock.MockContext

     */
    static ScriptedTestSession createSession() throws Exception
    {
        ScriptedTestSession result = new ScriptedTestSession(null);

        MockContext context = new MockContext();
        context.setServletContextName("context");
        MockRequest request = new MockRequest(context, "/app");

        MockResponse r = new MockResponse(request);
        result.setResponse(r);

View Full Code Here

Examples of org.apache.tapestry.test.mock.MockContext

        return source;
    }

    public void testServletContext()
    {
        MockContext context = new MockContext();

        context.setInitParameter("howard", "suzanne");

        IPropertySource source = new ServletContextPropertySource(context);

        expect(source, "howard", "suzanne");
        expect(source, "godzilla", null);
View Full Code Here

Examples of org.apache.tapestry.test.mock.MockContext

        }}
    } finally { }}

    private void setupForExecute()
    {try { __CLOVER_375_0.M[1908]++;
        __CLOVER_375_0.S[8308]++;_context = new MockContext(_scriptDescriptor.getRootDirectory());
        __CLOVER_375_0.S[8309]++;_context.setServletContextName(_scriptDescriptor.getContextName());
    } finally { }}
View Full Code Here

Examples of org.fcrepo.server.MockContext

        assertEquals(baseURL, message.getBaseUrl());
    }

    @Test
    public void testFedoraMethodConstructor() throws Exception {
        Context c = new MockContext();
        FedoraMethod fm;
        APIMMessage message;

        fm =
                new FedoraMethod(Management.class
View Full Code Here

Examples of org.jboss.as.naming.MockContext

        try {
            final JMSServerManager jmsServer = new JMSServerManagerImpl(hornetQServer.getValue());

            // TODO: This is a temp solution; see HORNETQ-650 for more info
            final Name emptyName = new CompositeName("");
            jmsServer.setContext(new MockContext((NamingContext)namingStore.getValue().lookup(emptyName), emptyName));

            try {
                // FIXME - we also need the TCCL here in case the JMSServerManager starts the HornetQServer
                final ClassLoader loader = getClass().getClassLoader();
                SecurityActions.setContextClassLoader(loader);
View Full Code Here

Examples of org.switchyard.MockContext

public class PolicyUtilTest {

    @Test
    public void testProvidePolicy() {
        Exchange ex = new MockExchange().setContext(new MockContext());
        PolicyUtil.provide(ex, DummyPolicy.A);
        Assert.assertTrue(PolicyUtil.isProvided(ex, DummyPolicy.A));
        Assert.assertFalse(PolicyUtil.isProvided(ex, DummyPolicy.B));
        Assert.assertFalse(PolicyUtil.isRequired(ex, DummyPolicy.B));
        Assert.assertEquals(1, PolicyUtil.getProvided(ex).size());
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.