TUM CCSM Commons

edu.tum.cs.commons.test
Class TestDataManager

java.lang.Object
  extended by edu.tum.cs.commons.test.TestDataManager

public class TestDataManager
extends java.lang.Object

Support class for identifying unused test data files. This class provides a method to access test data files and logs which test cases access which test files. On every access to a file, access statistic for used and unused files are written to "test-tmp".

This class is best used via inheriting from CCSMTestCaseBase.

Version:
$Rev: 26268 $
Author:
Florian Deissenboeck, Benjamin Hummel, $Author: juergens $
Rating:
GREEN Hash: 4E808795FAB1BE3BBDA0729E21312104

Field Summary
static java.lang.String REPORT_DIRECTORY_NAME
          Name of the directory to write reports to.
 
Method Summary
static TestDataManager getInstance(java.io.File directory)
          Returns the instance of the test data manager for the given directory.
 java.io.File getTestFile(java.lang.String filename, TestCase testCase)
          Marks the given file as used and returns the complete file (with directory).
 void printUnusedFiles(java.io.PrintWriter pw)
          Print a report on all files not used.
 void printUsedFiles(java.io.PrintWriter pw)
          Print a report on all files used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_DIRECTORY_NAME

public static final java.lang.String REPORT_DIRECTORY_NAME
Name of the directory to write reports to.

See Also:
Constant Field Values
Method Detail

getInstance

public static TestDataManager getInstance(java.io.File directory)
Returns the instance of the test data manager for the given directory.


getTestFile

public java.io.File getTestFile(java.lang.String filename,
                                TestCase testCase)
Marks the given file as used and returns the complete file (with directory).


printUnusedFiles

public void printUnusedFiles(java.io.PrintWriter pw)
Print a report on all files not used.


printUsedFiles

public void printUsedFiles(java.io.PrintWriter pw)
Print a report on all files used.


TUM CCSM Commons

TUM CCSM Commons - 2.7