org.fhcrc.cpl.toolbox.test.commandline
Class BaseCommandLineTest

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

public abstract class BaseCommandLineTest
extends BaseCommandTest

Abstract base class for all msInspect commandline tests. Provides convenient ways to invoke command line modules


Field Summary
protected  CommandLineModule commandLineModule
           
 
Constructor Summary
BaseCommandLineTest()
           
 
Method Summary
protected  void clearArgumentValues()
          Blow away all argument values
protected abstract  CommandLineModule createCommandLineModule()
          Each subclass should implement a method to return an instance of the commandlinemodule it needs to invoke
protected  boolean executeCommandLineModule(junit.framework.TestResult result)
          Execute the commandline module and add any exceptions to the test result (convenience method)
protected  CommandLineModule getCommandLineModule()
          Get a reference to the commandline module, creating if necessary
protected  void renewCommandLineModule()
          Create a new instance of the commandline module
protected  void setArgumentValue(java.lang.String argumentName, java.lang.String value)
          Set an argument value in the argumentValues map, overriding what's there
protected  void setUnnamedArgumentValue(java.lang.String value)
          Set the value of the unnamed argument
protected  void setUnnamedSeriesArgumentValue(java.lang.String value)
          Set the value of the unnamed argument
protected  void unsetArgumentValue(java.lang.String argumentName)
          Unet an argument value in the argumentValues map
protected  void unsetUnnamedArgumentValue()
          Unet the unnamed argument value in the argumentValues map
 
Methods inherited from class org.fhcrc.cpl.toolbox.test.BaseCommandTest
cleanup, constructTempFilePath, doCleanup, doRun, getTempDirName, log, run
 
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
 

Field Detail

commandLineModule

protected CommandLineModule commandLineModule
Constructor Detail

BaseCommandLineTest

public BaseCommandLineTest()
Method Detail

createCommandLineModule

protected abstract CommandLineModule createCommandLineModule()
Each subclass should implement a method to return an instance of the commandlinemodule it needs to invoke

Returns:

setArgumentValue

protected void setArgumentValue(java.lang.String argumentName,
                                java.lang.String value)
Set an argument value in the argumentValues map, overriding what's there

Parameters:
argumentName -
value -

unsetArgumentValue

protected void unsetArgumentValue(java.lang.String argumentName)
Unet an argument value in the argumentValues map

Parameters:
argumentName -

setUnnamedArgumentValue

protected void setUnnamedArgumentValue(java.lang.String value)
Set the value of the unnamed argument

Parameters:
value -

setUnnamedSeriesArgumentValue

protected void setUnnamedSeriesArgumentValue(java.lang.String value)
Set the value of the unnamed argument

Parameters:
value -

unsetUnnamedArgumentValue

protected void unsetUnnamedArgumentValue()
Unet the unnamed argument value in the argumentValues map


clearArgumentValues

protected void clearArgumentValues()
Blow away all argument values


getCommandLineModule

protected CommandLineModule getCommandLineModule()
Get a reference to the commandline module, creating if necessary

Returns:

renewCommandLineModule

protected void renewCommandLineModule()
Create a new instance of the commandline module


executeCommandLineModule

protected boolean executeCommandLineModule(junit.framework.TestResult result)
Execute the commandline module and add any exceptions to the test result (convenience method)

Parameters:
result -
Returns:
true iff there were no exceptions


Fred Hutchinson Cancer Research Center