站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.1.0 API 英文版文档

SeamTest (JBoss Seam API Documentation) - JBoss Seam 1.1.0 API 英文版文档


org.jboss.seam.mock
Class SeamTest

java.lang.Object
  extended by org.jboss.seam.mock.SeamTest

public class SeamTest
extends Object

Superclass for TestNG integration tests for JSF/Seam applications.

Version:
$Revision: 1.57 $
Author:
Gavin King, Thomas Heute

Nested Class Summary
 class SeamTest.FacesRequest
           
 class SeamTest.NonFacesRequest
           
 class SeamTest.Script
          Deprecated. use FacesRequest or NonFacesRequest
 
Constructor Summary
SeamTest()
           
 
Method Summary
 void begin()
           
 void cleanup()
           
protected  AbstractSeamPhaseListener createPhaseListener()
          Create a SeamPhaseListener by default.
 void end()
           
protected  Object getField(Object object, String fieldName)
           
protected  Map<String,String[]> getHeaders()
           
protected  InitialContext getInitialContext()
           
protected  Object getInstance(Class clazz)
          Helper method for resolving components in the test script.
protected  Object getInstance(String name)
          Helper method for resolving components in the test script.
protected  Map<String,String[]> getParameters()
           
protected  javax.servlet.http.HttpSession getSession()
           
protected  UserTransaction getUserTransaction()
           
 void init()
           
 void initServletContext(Map initParams)
          Override to set up any servlet context attributes.
protected  boolean isLongRunningConversation()
          Is there a long running conversation associated with the current request?
protected  boolean isSessionInvalid()
           
 Object lookup(String name)
          Search in all contexts
protected  void setField(Object object, String fieldName, Object value)
           
protected  void setPageParameter(String name, Object value)
           
protected  void setParameter(String name, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeamTest

public SeamTest()
Method Detail

setParameter

protected void setParameter(String name,
                            String value)

setPageParameter

protected void setPageParameter(String name,
                                Object value)

getParameters

protected Map<String,String[]> getParameters()

getHeaders

protected Map<String,String[]> getHeaders()

getSession

protected javax.servlet.http.HttpSession getSession()

isSessionInvalid

protected boolean isSessionInvalid()

getInstance

protected Object getInstance(Class clazz)
Helper method for resolving components in the test script.


getInstance

protected Object getInstance(String name)
Helper method for resolving components in the test script.


isLongRunningConversation

protected boolean isLongRunningConversation()
Is there a long running conversation associated with the current request?


lookup

public Object lookup(String name)
Search in all contexts


begin

public void begin()

end

public void end()

createPhaseListener

protected AbstractSeamPhaseListener createPhaseListener()
Create a SeamPhaseListener by default. Override to use one of the other standard Seam phase listeners.


init

public void init()
          throws Exception
Throws:
Exception

cleanup

public void cleanup()
             throws Exception
Throws:
Exception

initServletContext

public void initServletContext(Map initParams)
Override to set up any servlet context attributes.


getInitialContext

protected InitialContext getInitialContext()
                                    throws NamingException
Throws:
NamingException

getUserTransaction

protected UserTransaction getUserTransaction()
                                      throws NamingException
Throws:
NamingException

getField

protected Object getField(Object object,
                          String fieldName)

setField

protected void setField(Object object,
                        String fieldName,
                        Object value)