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

TestCaseContext - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.test.framework.container
Class TestCaseContext

java.lang.Object
  extended byorg.jboss.portal.test.framework.container.TestCaseContext
All Implemented Interfaces:
java.io.Serializable

public class TestCaseContext
extends java.lang.Object
implements java.io.Serializable

The test context seen from the server side.

See Also:
Serialized Form

Constructor Summary
TestCaseContext(java.lang.String testCaseId, int requestCount)
           
 
Method Summary
static TestCaseContext getCurrentContext()
          Return the current test case context.
static int getCurrentRequestCount()
           
static Result getCurrentResult()
           
static java.lang.String getCurrentTestCaseId()
           
 int getRequestCount()
          Return the test count.
 Result getResult()
          Return the result.
 java.lang.String getTestCaseId()
          Return the test id.
static boolean isCurrentCaseTestId(java.lang.String id)
           
static boolean isCurrentRequestCount(int count)
           
 java.lang.String rewriteURLForNode(java.lang.String url, NodeId nodeId)
           
static void setCurrentContext(TestCaseContext newContext)
          Set the current context.
static void setCurrentResult(Result currentResult)
           
 void setResult(Result result)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCaseContext

public TestCaseContext(java.lang.String testCaseId,
                       int requestCount)
Method Detail

getCurrentContext

public static TestCaseContext getCurrentContext()
                                         throws java.lang.IllegalStateException
Return the current test case context.

Returns:
the current test context
Throws:
java.lang.IllegalStateException - if there is no current context

setCurrentContext

public static void setCurrentContext(TestCaseContext newContext)
Set the current context.


getTestCaseId

public java.lang.String getTestCaseId()
Return the test id.

Returns:
the test id

getRequestCount

public int getRequestCount()
Return the test count.

Returns:
the test count

getResult

public Result getResult()
Return the result.

Returns:
the result of the test

setResult

public void setResult(Result result)

rewriteURLForNode

public java.lang.String rewriteURLForNode(java.lang.String url,
                                          NodeId nodeId)
                                   throws java.net.MalformedURLException
Parameters:
url - the url to rewrite
nodeId - the node id
Returns:
the rewritten url
Throws:
java.net.MalformedURLException
java.lang.IllegalArgumentException - if the url is null or the node id not recognized

isCurrentCaseTestId

public static boolean isCurrentCaseTestId(java.lang.String id)
                                   throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getCurrentTestCaseId

public static java.lang.String getCurrentTestCaseId()
                                             throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

isCurrentRequestCount

public static boolean isCurrentRequestCount(int count)
                                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getCurrentRequestCount

public static int getCurrentRequestCount()
                                  throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getCurrentResult

public static Result getCurrentResult()
                               throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setCurrentResult

public static void setCurrentResult(Result currentResult)
                             throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

toString

public java.lang.String toString()