Examples of PortletConfig


Examples of javax.portlet.PortletConfig

    public void testGetInitParameterValue()
    {
        String value = "William Orbit";

        MockControl control = newControl(PortletConfig.class);
        PortletConfig config = (PortletConfig) control.getMock();

        config.getInitParameter("artist");
        control.setReturnValue(value);

        replayControls();

        PortletWebActivator pwa = new PortletWebActivator(config);
View Full Code Here

Examples of javax.portlet.PortletConfig

public class TestPortletApplicationSpecificationInitializer extends HiveMindTestCase
{
    private PortletConfig newConfig(String name)
    {
        MockControl control = newControl(PortletConfig.class);
        PortletConfig config = (PortletConfig) control.getMock();

        config.getPortletName();
        control.setReturnValue(name);

        return config;
    }
View Full Code Here

Examples of javax.portlet.PortletConfig

        return (ApplicationGlobals) newMock(ApplicationGlobals.class);
    }

    public void testFoundInSubdir() throws Exception
    {
        PortletConfig config = newConfig("myportlet");

        MockControl contextc = newControl(WebContext.class);
        WebContext context = (WebContext) contextc.getMock();

        IApplicationSpecification specification = newSpecification();
View Full Code Here

Examples of javax.portlet.PortletConfig

        verifyControls();
    }

    public void testFoundInRootDir() throws Exception
    {
        PortletConfig config = newConfig("myportlet");

        MockControl contextc = newControl(WebContext.class);
        WebContext context = (WebContext) contextc.getMock();

        IApplicationSpecification specification = newSpecification();
View Full Code Here

Examples of javax.portlet.PortletConfig

        verifyControls();
    }

    public void testNotFound() throws Exception
    {
        PortletConfig config = newConfig("myportlet");

        MockControl contextc = newControl(WebContext.class);
        WebContext context = (WebContext) contextc.getMock();

        context.getResource("/WEB-INF/myportlet/myportlet.application");
View Full Code Here

Examples of javax.portlet.PortletConfig

public class PortletConfigStrategy implements DescribableStrategy
{

    public void describeObject(Object object, DescriptionReceiver receiver)
    {
        PortletConfig pc = (PortletConfig) object;

        receiver.title("Portlet Config");

        receiver.property("portletName", pc.getPortletName());

        receiver.section("Init Parameters");

        Iterator i = WebUtils.toSortedList(pc.getInitParameterNames()).iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();
            receiver.property(name, pc.getInitParameter(name));
        }
    }
View Full Code Here

Examples of javax.portlet.PortletConfig

    public void testParseOptionalDescriptors() throws Exception
    {
        MockControl configc = MockControl.createControl(PortletConfig.class);
        addControl(configc);
        PortletConfig config = (PortletConfig) configc.getMock();

        MockControl contextc = MockControl.createControl(PortletContext.class);
        addControl(contextc);
        PortletContext context = (PortletContext) contextc.getMock();

        config.getPortletName();
        configc.setReturnValue("myportlet", 3);

        // Called once in ApplicationPortlet code,
        // then inside PortletWebContextInitializer

        config.getPortletContext();
        configc.setReturnValue(context, 2);

        context.getResource("/WEB-INF/myportlet/hivemodule.xml");
        contextc.setReturnValue(getClass().getResource("hivemodule-portlet.xml"), 2);
View Full Code Here

Examples of javax.portlet.PortletConfig

        PortletApplicationInitializer initializer = newInitializer();
        ActionRequestServicer actionRequestServicer = newActionRequestServicer();
        RenderRequestServicer renderRequestServicer = newRenderRequestServicer();

        Registry registry = newRegistry(initializer, actionRequestServicer, renderRequestServicer);
        PortletConfig config = newConfig();

        initializer.initialize(config);

        replayControls();
View Full Code Here

Examples of javax.portlet.PortletConfig

        ActionRequestServicer actionRequestServicer = newActionRequestServicer();
        RenderRequestServicer renderRequestServicer = newRenderRequestServicer();

        Registry registry = newRegistry(initializer, actionRequestServicer, renderRequestServicer);

        PortletConfig config = newConfig();

        initializer.initialize(config);

        replayControls();
View Full Code Here

Examples of javax.portlet.PortletConfig

        ActionRequestServicer actionRequestServicer = newActionRequestServicer();
        RenderRequestServicer renderRequestServicer = newRenderRequestServicer();

        Registry registry = newRegistry(initializer, actionRequestServicer, renderRequestServicer);

        PortletConfig config = newConfig();

        initializer.initialize(config);

        replayControls();
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.