org.jboss.portal.test.framework.info
Class TestInfo

java.lang.Object
  extended by org.jboss.portal.test.framework.info.TestItemInfo
      extended by org.jboss.portal.test.framework.info.TestInfo
All Implemented Interfaces:
java.io.Serializable

public class TestInfo
extends TestItemInfo

Meta information that describe a test.

Version:
$Revision: 7228 $
Author:
Julien Viet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.portal.test.framework.info.TestItemInfo
TestItemInfo.AbstractVisitor, TestItemInfo.Visitor
 
Field Summary
 
Fields inherited from class org.jboss.portal.test.framework.info.TestItemInfo
description, name, parent
 
Constructor Summary
TestInfo(java.lang.String name)
          Create a named test.
TestInfo(java.lang.String name, java.lang.String description)
          Create a named test.
TestInfo(TestInfo that)
          Copy constructor.
 
Method Summary
 void addParameter(TestParameterInfo parameter)
          Add a test required to execute the test.
 TestItemInfo createClone()
          Create a deep clone of the current item in a detyped manner.
 TestItemInfo findItem(java.lang.String itemId)
          Find an item within the scope of the current item.
 TestParameterInfo getParameter(java.lang.String parameterName)
          Return a specified parameter.
 java.util.Set getParameterNames()
          Return the set of parameter names.
protected  void internalVisit(TestItemInfo.Visitor visitor)
           
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.portal.test.framework.info.TestItemInfo
getDescription, getId, getName, getParent, internalGetId, internalGetId, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestInfo

public TestInfo(TestInfo that)
         throws java.lang.IllegalArgumentException
Copy constructor.

Parameters:
that - the structure to copy
Throws:
java.lang.IllegalArgumentException - if the test to copy is null

TestInfo

public TestInfo(java.lang.String name)
         throws java.lang.IllegalArgumentException
Create a named test.

Parameters:
name - the test name
Throws:
java.lang.IllegalArgumentException - if the name is null

TestInfo

public TestInfo(java.lang.String name,
                java.lang.String description)
         throws java.lang.IllegalArgumentException
Create a named test.

Parameters:
name - the test name
description - the test description
Throws:
java.lang.IllegalArgumentException - if the name is null
Method Detail

createClone

public TestItemInfo createClone()
Description copied from class: TestItemInfo
Create a deep clone of the current item in a detyped manner.

Specified by:
createClone in class TestItemInfo
Returns:
a deep clone of the current item

addParameter

public void addParameter(TestParameterInfo parameter)
                  throws java.lang.IllegalArgumentException
Add a test required to execute the test.

Parameters:
parameter - the parameter to add
Throws:
java.lang.IllegalArgumentException - if the parameter is null or already exising

getParameterNames

public java.util.Set getParameterNames()
Return the set of parameter names.

Returns:
the parameter names

getParameter

public TestParameterInfo getParameter(java.lang.String parameterName)
                               throws java.lang.IllegalArgumentException
Return a specified parameter.

Parameters:
parameterName - the parameter name to retrieve
Returns:
the parameter or null if it does not exist
Throws:
java.lang.IllegalArgumentException - if the parameter name is null

findItem

public TestItemInfo findItem(java.lang.String itemId)
Description copied from class: TestItemInfo
Find an item within the scope of the current item.

Specified by:
findItem in class TestItemInfo
Parameters:
itemId - the item id to find
Returns:
the item or null if not found

internalVisit

protected void internalVisit(TestItemInfo.Visitor visitor)
Specified by:
internalVisit in class TestItemInfo

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object