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

TestCase - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.test.framework.container.client
Class TestCase

java.lang.Object
  extended byjunit.framework.TestCase
      extended byorg.jboss.portal.test.framework.container.client.TestCase

public class TestCase
extends junit.framework.TestCase

Base class for portlet test case.

Version:
$Revision: 5498 $
Author:
Julien Viet, Boleslaw Dawidowicz
See Also:
Serialized Form

Field Summary
private  org.apache.commons.httpclient.HttpClient client
          .
private  Node currentNode
          .
private  NodeId initialNodeId
          .
private  org.apache.log4j.Logger log
          .
private  int requestCount
          .
protected  TestRunner runner
          The runner we belong to.
protected  java.lang.String testCaseId
          The test case id.
protected  java.lang.String uri
          The initial uri.
 
Constructor Summary
TestCase(NodeId initialNodeId, java.lang.String testCaseId)
           
TestCase(NodeId initialNodeId, java.lang.String testCaseId, java.lang.String uri)
           
TestCase(java.lang.String testCaseId)
           
TestCase(java.lang.String testCaseId, java.lang.String uri)
           
 
Method Summary
private  ClientCommand evaluateHttpMethodResponse(org.apache.commons.httpclient.HttpMethod hm)
           
 int executeMethod(org.apache.commons.httpclient.HttpMethod method)
           
 java.lang.String getName()
          Override with the test case id.
private  Node getNode(int port)
           
 int getPort(Node node)
           
protected  void run(ClientCommand cmd)
           
protected  void runTest()
          Perform the test run.
 void setRunner(TestRunner runner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.apache.log4j.Logger log
.


testCaseId

protected java.lang.String testCaseId
The test case id.


runner

protected TestRunner runner
The runner we belong to.


uri

protected java.lang.String uri
The initial uri.


initialNodeId

private NodeId initialNodeId
.


requestCount

private int requestCount
.


client

private org.apache.commons.httpclient.HttpClient client
.


currentNode

private Node currentNode
.

Constructor Detail

TestCase

public TestCase(java.lang.String testCaseId)

TestCase

public TestCase(NodeId initialNodeId,
                java.lang.String testCaseId)

TestCase

public TestCase(java.lang.String testCaseId,
                java.lang.String uri)

TestCase

public TestCase(NodeId initialNodeId,
                java.lang.String testCaseId,
                java.lang.String uri)
Method Detail

setRunner

public void setRunner(TestRunner runner)

getName

public final java.lang.String getName()
Override with the test case id.


runTest

protected final void runTest()
                      throws java.lang.Throwable
Perform the test run.

Throws:
java.lang.Throwable

run

protected final void run(ClientCommand cmd)
                  throws java.lang.Throwable
Throws:
java.lang.Throwable

evaluateHttpMethodResponse

private ClientCommand evaluateHttpMethodResponse(org.apache.commons.httpclient.HttpMethod hm)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

executeMethod

public int executeMethod(org.apache.commons.httpclient.HttpMethod method)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getNode

private Node getNode(int port)

getPort

public int getPort(Node node)