JSF Test Framework: Mock 1.1.2

org.jboss.test.faces.mock
Class MockFacesEnvironment

java.lang.Object
  extended by org.jboss.test.faces.mock.MockFacesEnvironment
All Implemented Interfaces:
FacesMockController.MockObject

public class MockFacesEnvironment
extends Object
implements FacesMockController.MockObject

Author:
asmirnov@exadel.com

Constructor Summary
MockFacesEnvironment(org.easymock.IMocksControl mocksControl, String name)
           
 
Method Summary
static MockFacesEnvironment createEnvironment()
           
<T> T
createMock(Class<T> mock)
           
<T> T
createMock(String name, Class<T> mock)
           
static MockFacesEnvironment createNiceEnvironment()
           
static MockFacesEnvironment createStrictEnvironment()
           
 javax.faces.application.Application getApplication()
          

 javax.servlet.ServletContext getContext()
          

 org.easymock.IMocksControl getControl()
           
 javax.el.ELContext getElContext()
          

 javax.faces.context.ExternalContext getExternalContext()
          

 javax.faces.context.FacesContext getFacesContext()
          

static MockFacesEnvironment getInstance()
          

 javax.faces.render.RenderKit getRenderKit()
          

 javax.servlet.http.HttpServletRequest getRequest()
          

 javax.servlet.http.HttpServletResponse getResponse()
          

 javax.faces.render.ResponseStateManager getResponseStateManager()
          

 RecordingResponseWriter getResponseWriter()
           
 javax.faces.application.ViewHandler getViewHandler()
          

 void release()
           
 MockFacesEnvironment replay()
           
 MockFacesEnvironment reset()
           
 MockFacesEnvironment resetToDefault()
           
 MockFacesEnvironment resetToNice()
           
 MockFacesEnvironment resetToStrict()
           
 void verify()
           
 MockFacesEnvironment withApplication()
           
 MockFacesEnvironment withELContext()
           
 MockFacesEnvironment withExternalContext()
           
 MockFacesEnvironment withFactories()
           
 MockFacesEnvironment withRenderKit()
           
 MockFacesEnvironment withReSponseWriter()
           
 MockFacesEnvironment withServletRequest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockFacesEnvironment

public MockFacesEnvironment(org.easymock.IMocksControl mocksControl,
                            String name)
Method Detail

createEnvironment

public static MockFacesEnvironment createEnvironment()

createStrictEnvironment

public static MockFacesEnvironment createStrictEnvironment()

createNiceEnvironment

public static MockFacesEnvironment createNiceEnvironment()

getInstance

public static MockFacesEnvironment getInstance()

Returns:
the instance

createMock

public <T> T createMock(Class<T> mock)

createMock

public <T> T createMock(String name,
                        Class<T> mock)

withExternalContext

public MockFacesEnvironment withExternalContext()

withELContext

public MockFacesEnvironment withELContext()

withServletRequest

public MockFacesEnvironment withServletRequest()

withFactories

public MockFacesEnvironment withFactories()

withApplication

public MockFacesEnvironment withApplication()

withRenderKit

public MockFacesEnvironment withRenderKit()

withReSponseWriter

public MockFacesEnvironment withReSponseWriter()

replay

public MockFacesEnvironment replay()

reset

public MockFacesEnvironment reset()

resetToStrict

public MockFacesEnvironment resetToStrict()

resetToDefault

public MockFacesEnvironment resetToDefault()

resetToNice

public MockFacesEnvironment resetToNice()

verify

public void verify()

release

public void release()

getFacesContext

public javax.faces.context.FacesContext getFacesContext()

Returns:
the facesContext

getExternalContext

public javax.faces.context.ExternalContext getExternalContext()

Returns:
the externalContext

getElContext

public javax.el.ELContext getElContext()

Returns:
the elContext

getContext

public javax.servlet.ServletContext getContext()

Returns:
the context

getRequest

public javax.servlet.http.HttpServletRequest getRequest()

Returns:
the request

getResponse

public javax.servlet.http.HttpServletResponse getResponse()

Returns:
the response

getApplication

public javax.faces.application.Application getApplication()

Returns:
the application

getViewHandler

public javax.faces.application.ViewHandler getViewHandler()

Returns:
the viewHandler

getRenderKit

public javax.faces.render.RenderKit getRenderKit()

Returns:
the renderKit

getResponseStateManager

public javax.faces.render.ResponseStateManager getResponseStateManager()

Returns:
the responseStateManager

getResponseWriter

public RecordingResponseWriter getResponseWriter()
Returns:
the responseWriter

getControl

public org.easymock.IMocksControl getControl()
Specified by:
getControl in interface FacesMockController.MockObject

JSF Test Framework: Mock 1.1.2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.