org.apache.pluto.testsuite
Interface PortletTest

All Known Implementing Classes:
AbstractReflectivePortletTest, ActionParameterTest, AppScopedSessionAttributeTest, ContextInitParameterTest, DispatcherRenderParameterTest, DispatcherRequestTest, ExternalAppScopedAttributeTest, MiscTest, NoOpTest, PreferenceCommonTest, PreferenceInActionTest, PreferenceInRenderTest, RenderParameterTest, RenderResponseNoContentTypeTest, ResourceBundleTest, SecurityMappingTest, SessionTimeoutTest, SimpleAttributeTest

public interface PortletTest

Interface for pluto portlet test classes.


Method Summary
 void doHeaders(PortletConfig config, PortletContext context, RenderRequest request, RenderResponse response)
          Called by TestPortlet.doHeaders()
 TestResults doTest(PortletConfig config, PortletContext context, PortletRequest request, PortletResponse response)
          Runs the test.
 TestConfig getConfig()
          Returns the test configuration.
 java.util.Map<java.lang.String,java.lang.String[]> getRenderParameters(PortletRequest request)
          Returns the render parameters.
 java.lang.String getTestSuiteName()
          Returns the test suite name.
 void init(TestConfig config)
          Initializes the portlet test using test configuration.
 

Method Detail

getTestSuiteName

java.lang.String getTestSuiteName()
Returns the test suite name.

Returns:
the test suite name.

init

void init(TestConfig config)
Initializes the portlet test using test configuration.

Parameters:
config - the test configuration.

getRenderParameters

java.util.Map<java.lang.String,java.lang.String[]> getRenderParameters(PortletRequest request)
Returns the render parameters. This method will be invoked in Portlet.processAction() method. All parameters returned by this method will be set as render parameters.

Parameters:
request - the portlet request.
Returns:
a map of render parameters, key is the string name of the parameter, value is a string array.

doTest

TestResults doTest(PortletConfig config,
                   PortletContext context,
                   PortletRequest request,
                   PortletResponse response)
Runs the test.

Parameters:
config - the portlet config.
context - the portlet context.
request - the portlet request.
response - the portlet response.
Returns:
the results of the test.

getConfig

TestConfig getConfig()
Returns the test configuration.

Returns:
the test configuration.

doHeaders

void doHeaders(PortletConfig config,
               PortletContext context,
               RenderRequest request,
               RenderResponse response)
Called by TestPortlet.doHeaders()

Parameters:
config -
context -
request -
response -


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.