edu.sdsc.inca.agent.access
Class AccessMethodTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.sdsc.inca.agent.access.AccessMethodTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
GlobusTest, LocalTest, ManualTest, SshTest

public abstract class AccessMethodTestCase
extends junit.framework.TestCase

Base class for implementing access method tests (i.e., run the same tests consistently on each method). To use, 1) implement hasRequirements which can be used to check for specific prerequisites before a test is run (default is to always run test) 2) set checkResult to specify whether results should be checked or not (e.g., we don't for Manual). Default is to always check.

Author:
Shava Smallen <ssmallen@sdsc.edu>

Nested Class Summary
 class AccessMethodTestCase.TmpPasswordFilter
           
 
Field Summary
protected  boolean checkResult
           
protected static org.apache.log4j.Logger logger
           
protected  AccessMethod[] procs
           
 
Constructor Summary
AccessMethodTestCase()
           
 
Method Summary
 boolean hasRequirements()
          Check for any requirements for running a test using the specific access method.
 void testHome()
          Test that we can get the remote home directory
 void testRun()
          Run thru a set of execution tests using the specified access method
 void testRunInterrupt()
          Need to make sure access methods are throwing InterruptedExceptions when they get interrupted
 void testStartStop()
          Run thru a set of start/stop process tests using the specified access method
 void testTransfer()
          Run thru a set of transfer tests using the specified access method
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

procs

protected AccessMethod[] procs

checkResult

protected boolean checkResult
Constructor Detail

AccessMethodTestCase

public AccessMethodTestCase()
Method Detail

hasRequirements

public boolean hasRequirements()
Check for any requirements for running a test using the specific access method.

Returns:
True if all requirements are met and it's okay to run the test; false otherwise.

testTransfer

public void testTransfer()
                  throws java.lang.Exception
Run thru a set of transfer tests using the specified access method

Throws:
java.lang.Exception - if problem executing test

testRun

public void testRun()
             throws java.lang.Exception
Run thru a set of execution tests using the specified access method

Throws:
java.lang.Exception - if problem executing test

testRunInterrupt

public void testRunInterrupt()
                      throws java.lang.Exception
Need to make sure access methods are throwing InterruptedExceptions when they get interrupted

Throws:
java.lang.Exception - if problem executing test

testHome

public void testHome()
              throws java.lang.Exception
Test that we can get the remote home directory

Throws:
java.lang.Exception - if problem executing test

testStartStop

public void testStartStop()
                   throws java.lang.Exception
Run thru a set of start/stop process tests using the specified access method

Throws:
java.lang.Exception - if problem executing test