junitx.ddtunit.data
Class TestClusterDataSet

java.lang.Object
  extended by junitx.ddtunit.data.DataSet
      extended by junitx.ddtunit.data.TestClusterDataSet
All Implemented Interfaces:
IDataSet

public class TestClusterDataSet
extends DataSet

Author:
jg

Field Summary
 
Fields inherited from class junitx.ddtunit.data.DataSet
objectMap
 
Constructor Summary
TestClusterDataSet(String setId, IDataSet parent)
           
 
Method Summary
 boolean containsTest(String groupId, String testId)
          Check if test exists for specified group
 AssertObject getAssert(String groupId, String testId, String assertId)
          Retrieve assert object of requested group and test
 AssertObject getAssert(String groupId, String testId, String assertId, String assertType)
          Retrieve assert object of requested group and test
 TypedObjectMap getAssertMap(String groupId, String testId)
           
 TypedObject getObject(String groupId, String testId, String objectId)
          Retrieve object of specidied testdata under testgroup
 TypedObject getObject(String groupId, String testId, String objectId, String objectType)
          Retrieve object of requested testdata under testgroup
 List<String> getOrderedTestKeys(String groupName)
           
 TestDataSet getTestDataSet(String groupId, String testId)
          Retrieve DataSet of specified group and test if exists.
 Iterator getTestDataSets(String groupId)
          Get iterator on collection of all tests contained in specified test group
 Iterator getTestEntries(String groupName)
          Get iterator of all tests contained in specified test group
 int size()
          Retrieve number of sub datasets
 int size(String group)
           
 
Methods inherited from class junitx.ddtunit.data.DataSet
containsKey, findObject, findObject, get, getId, getObject, getObject, getSubDataIterator, getSubDataValues, put, putObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestClusterDataSet

public TestClusterDataSet(String setId,
                          IDataSet parent)
Parameters:
setId - under which dataset can be retrieved
Method Detail

size

public int size()
Description copied from interface: IDataSet
Retrieve number of sub datasets

Specified by:
size in interface IDataSet
Overrides:
size in class DataSet
Returns:
number of tests in all groups of this cluster

size

public int size(String group)
Returns:
number of testgroup containing testdata

containsTest

public boolean containsTest(String groupId,
                            String testId)
Check if test exists for specified group

Parameters:
groupId - name to check
testId - name to check
Returns:
true if test data is found

getTestDataSet

public TestDataSet getTestDataSet(String groupId,
                                  String testId)
Retrieve DataSet of specified group and test if exists.
Otherwise null is returned.

Parameters:
groupId - of DataSet to select
testId - of test under group of DataSet to select
Returns:
DataSet of specified groupId/testId or null if no DataSet was found.

getTestEntries

public Iterator getTestEntries(String groupName)
Get iterator of all tests contained in specified test group

Parameters:
groupName - of test group to lookup
Returns:
Iterator or null if no entry is found

getTestDataSets

public Iterator getTestDataSets(String groupId)
Get iterator on collection of all tests contained in specified test group

Parameters:
groupId - of test group to lookup
Returns:
Iterator of TestDatSets identified by groupId

getObject

public TypedObject getObject(String groupId,
                             String testId,
                             String objectId)
Retrieve object of specidied testdata under testgroup

Parameters:
groupId - to search
testId - to search
objectId - to retrieve
Returns:
TypedObject of requested object

getObject

public TypedObject getObject(String groupId,
                             String testId,
                             String objectId,
                             String objectType)
Retrieve object of requested testdata under testgroup

Parameters:
groupId - to search
testId - to search
objectId - to retrieve
objectType - of object to retrieve
Returns:
TypedObject requested

getAssert

public AssertObject getAssert(String groupId,
                              String testId,
                              String assertId)
Retrieve assert object of requested group and test

Parameters:
groupId - to search
testId - to search
assertId - to retrieve
Returns:
AssertObject

getAssert

public AssertObject getAssert(String groupId,
                              String testId,
                              String assertId,
                              String assertType)
Retrieve assert object of requested group and test

Parameters:
groupId - to search
testId - to search
assertId - to search
assertType - to search
Returns:
AssertObject

getAssertMap

public TypedObjectMap getAssertMap(String groupId,
                                   String testId)

getOrderedTestKeys

public List<String> getOrderedTestKeys(String groupName)


Copyright © 2004-2011. All Rights Reserved.