de.smartics.testdoc.core.doc
Class UnitTestDocIndex

Package class diagram package UnitTestDocIndex
java.lang.Object
  extended by de.smartics.testdoc.core.doc.UnitTestDocIndex
All Implemented Interfaces:
Serializable

@ThreadSafe
public class UnitTestDocIndex
     
     
extends Object
implements Serializable

The index of all collected unit test documentation instances.

Author:
Robert Reiner
See Also:
Serialized Form

Constructor Summary
UnitTestDocIndex()
          Default constructor.
 
Method Summary
 void clear()
          Clears the index.
 void deregisterTestCase(Type testCaseType)
          Removes all scenarios of the given test case type.
 UnitTestDoc get(Type uutType)
          Returns the unit test documentation for the given UUT type.
 List<UnitTestDoc> getByTestCase(Type testCaseType)
          Returns the list of UUT documentation whose UUT is tested by the given test case.
 Integer getSize()
          Returns the number of registered unit test documentation.
 List<UnitTestDoc> getUnitTestDocs()
          Returns a copy of the internal map that contains the test documentation instances.
 boolean isEmpty()
          Checks whether the index contains elements or not.
 UnitTestDoc register(UnitTestDoc unitTestDoc)
          Registers the given test documentation to the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitTestDocIndex

public UnitTestDocIndex()
Default constructor.

Method Detail

getUnitTestDocs

public List<UnitTestDoc> getUnitTestDocs()
Returns a copy of the internal map that contains the test documentation instances.

Returns:
the content of the index.

getSize

public Integer getSize()
Returns the number of registered unit test documentation.

Returns:
the number of registered unit test documentation.

isEmpty

public boolean isEmpty()
Checks whether the index contains elements or not.

Returns:
true if there is at least on element in the index, false otherwise.

register

public UnitTestDoc register(UnitTestDoc unitTestDoc)
                     throws NullPointerException
Registers the given test documentation to the index. If a documentation is already registered, all information from the given testDoc is added to the already registered instance.

Parameters:
unitTestDoc - the test documentation to add.
Returns:
a reference to the registered instance.
Throws:
NullPointerException - if testDoc is null.

get

public UnitTestDoc get(Type uutType)
Returns the unit test documentation for the given UUT type.

Parameters:
uutType - the type of the UUT whose test documentation is requested.
Returns:
the test documentation for the given UUT type or null if nothing is registered for that type.

getByTestCase

public List<UnitTestDoc> getByTestCase(Type testCaseType)
Returns the list of UUT documentation whose UUT is tested by the given test case.

Parameters:
testCaseType - the type of the test case whose UUT documentation is requested.
Returns:
the UUT documentation of all UUTs tested by the given test case type.

deregisterTestCase

public void deregisterTestCase(Type testCaseType)
                        throws org.apache.commons.lang.NullArgumentException
Removes all scenarios of the given test case type.

Parameters:
testCaseType - the type of the test case whose scenario are to be removed.
Throws:
org.apache.commons.lang.NullArgumentException - if testCaseType is null.

clear

public void clear()
Clears the index.



Copyright © 2010-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.