org.fhcrc.cpl.toolbox.test
Class BaseCommandTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.fhcrc.cpl.toolbox.test.BaseCommandTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
BaseCommandLineTest

public abstract class BaseCommandTest
extends junit.framework.TestCase

Abstract base class for all msInspect tests. Lots of utility methods


Constructor Summary
BaseCommandTest()
           
 
Method Summary
 void cleanup()
          Call the doCleanup method in the test itself to do any necessary cleanup.
protected  java.lang.String constructTempFilePath(java.lang.String fileName)
           
protected abstract  void doCleanup()
          Each implementing class can do special cleanup here
protected abstract  void doRun(junit.framework.TestResult result)
          Do the actual guts of the test
protected  java.lang.String getTempDirName()
          Simple covers to get temp directory info for this class
protected  void log(java.lang.String message)
           
 void run(junit.framework.TestResult result)
          Create a temp dir for the class to work in, then run the test
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseCommandTest

public BaseCommandTest()
Method Detail

cleanup

public void cleanup()
             throws java.lang.Exception
Call the doCleanup method in the test itself to do any necessary cleanup. Then recursively delete all files in the test's temp dir, which is assigned by class name.

Throws:
java.lang.Exception

getTempDirName

protected java.lang.String getTempDirName()
Simple covers to get temp directory info for this class


constructTempFilePath

protected java.lang.String constructTempFilePath(java.lang.String fileName)

doCleanup

protected abstract void doCleanup()
                           throws java.lang.Exception
Each implementing class can do special cleanup here

Throws:
java.lang.Exception

run

public void run(junit.framework.TestResult result)
Create a temp dir for the class to work in, then run the test

Specified by:
run in interface junit.framework.Test
Overrides:
run in class junit.framework.TestCase
Parameters:
result -

doRun

protected abstract void doRun(junit.framework.TestResult result)
Do the actual guts of the test

Parameters:
result -

log

protected void log(java.lang.String message)


Fred Hutchinson Cancer Research Center