public abstract class AbstractMyFacesRequestTestCase extends AbstractMyFacesTestCase
Abstract JUnit test case base class, with method to setup/teardown a request. It helps to create tests that involve multiple requests like client submits, or tests that involve more control over the lifecycle.
AbstractMyFacesTestCase.MyFacesMockFacesConfigurationProvider
Modifier and Type | Field and Description |
---|---|
protected Application |
application |
protected MockMyFacesClient |
client |
protected ExternalContext |
externalContext |
protected FacesContext |
facesContext |
protected org.apache.myfaces.test.mock.MockHttpServletRequest |
request |
protected org.apache.myfaces.test.mock.MockHttpServletResponse |
response |
protected org.apache.myfaces.test.mock.MockHttpSession |
session |
AFTER_RENDER_STEP, BEFORE_RENDER_STEP, BUILD_VIEW_CYCLE_STEP, facesConfigurationProvider, facesContextFactory, LAST_PHASE_PROCESSED, LAST_RENDER_PHASE_STEP, lifecycle, lifecycleFactory, listener, PHASE_MANAGER_INSTANCE, servletConfig, servletContext, VIEWHANDLER_RENDER_STEP
Constructor and Description |
---|
AbstractMyFacesRequestTestCase() |
Modifier and Type | Method and Description |
---|---|
protected MockMyFacesClient |
createClient() |
protected String |
getContextPath() |
protected String |
getRenderedContent() |
protected String |
getServletPath() |
protected void |
inputText(UIComponent input,
String text) |
protected void |
processApplyRequestValuesPhase() |
protected void |
processInvokeApplicationPhase() |
protected void |
processLifecycleExecute() |
protected void |
processLifecycleExecuteAndRender() |
protected void |
processRemainingExecutePhases() |
protected void |
processRemainingPhases() |
protected void |
processRender() |
protected void |
processRestoreViewPhase() |
protected void |
processUpdateModelPhase() |
protected void |
processValidationsPhase() |
void |
setUp()
Set up instance variables required by this test case.
|
protected void |
setupRequest() |
protected void |
setupRequest(String pathInfo) |
protected void |
setupRequest(String pathInfo,
String query) |
protected void |
submit(UIComponent component)
Simulate a submit, processing the remaining phases and setting up the new request.
|
void |
tearDown() |
protected void |
tearDownRequest() |
createExpressionFactory, createFacesConfigurationProvider, executeAfterRender, executeBeforeRender, executeBuildViewCycle, executePhase, executeViewHandlerRender, getRenderedContent, getWebappContextFilePath, getWebappContextURI, isScanAnnotations, processApplyRequestValuesPhase, processInvokeApplicationPhase, processLifecycleExecute, processRemainingExecutePhases, processRemainingPhases, processRender, processRestoreViewPhase, processUpdateModelPhase, processValidationsPhase, setUpFacesServlet, setUpMyFaces, setUpServletListeners, setUpServletObjects, setUpServlets, setUpWebConfigParams, tearDownFacesServlet, tearDownMyFaces, tearDownServletListeners, tearDownServlets
protected MockMyFacesClient client
protected org.apache.myfaces.test.mock.MockHttpServletRequest request
protected org.apache.myfaces.test.mock.MockHttpServletResponse response
protected org.apache.myfaces.test.mock.MockHttpSession session
protected Application application
protected ExternalContext externalContext
protected FacesContext facesContext
public void setUp() throws Exception
AbstractMyFacesTestCase
Set up instance variables required by this test case.
setUp
in class AbstractMyFacesTestCase
Exception
public void tearDown() throws Exception
tearDown
in class AbstractMyFacesTestCase
Exception
protected void setupRequest(String pathInfo, String query) throws Exception
Exception
protected MockMyFacesClient createClient()
protected void tearDownRequest()
protected String getContextPath()
protected String getServletPath()
protected void processLifecycleExecuteAndRender() throws Exception
Exception
protected void processApplyRequestValuesPhase() throws Exception
Exception
protected void processInvokeApplicationPhase() throws Exception
Exception
protected void processRemainingExecutePhases() throws Exception
Exception
protected String getRenderedContent() throws IOException
IOException
protected void inputText(UIComponent input, String text)
protected void submit(UIComponent component) throws Exception
component
- Exception
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.