/**
 * 
 */
package org.ajax4jsf.portlet;

import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;

/**
 * @author asmirnov
 *
 */
public class AbstractAjax4jsfPortletTestCase extends AbstractAjax4JsfTestCase {

    protected MockActionRequest actionRequest;
    protected MockActionResponse actionResponse;
    protected MockPortletContext portletContext;
    protected MockRenderRequest renderRequest;
    protected MockRenderResponse renderResponse;

    public AbstractAjax4jsfPortletTestCase(String name) {
	super(name);
    }
    
    public void setUp() throws Exception {
        super.setUp();
    }
    
    public void tearDown() throws Exception {
        super.tearDown();
        actionRequest = null;
        actionResponse = null;
        renderRequest = null;
        renderResponse = null;
        portletContext = null;
    }

    /**
     * 
     */
    protected void setupActionRequest() {
        actionRequest = new MockActionRequest();
	actionResponse = new MockActionResponse();
	portletContext = new MockPortletContext();
	externalContext.setRequest(actionRequest);
        externalContext.setResponse(actionResponse);
    }

    /**
     * 
     */
    protected void setupRenderRequest() {
        renderRequest = new MockRenderRequest();
	renderResponse = new MockRenderResponse();
	portletContext = new MockPortletContext();
	externalContext.setRequest(renderRequest);
        externalContext.setResponse(renderResponse);
    }

}
