org.icenigrid.gridsam.integration.common
Class AbstractJobManagerTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.icenigrid.gridsam.integration.common.AbstractJobManagerTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractJobSubmissionTestCase

public abstract class AbstractJobManagerTestCase
extends junit.framework.TestCase

Author:
wwhl

Constructor Summary
AbstractJobManagerTestCase(java.lang.String s)
          create a new AbstractJobManagerTestCase
 
Method Summary
protected  JobInstance assertSuccessfulSubmission(java.lang.String pJSDL, long fWait)
          submit a job that is expected to reach the done stage in pWait number of milliseconds
protected  JobInstance assertTerminatedSubmission(java.lang.String pJSDL, long fWait)
          submit a job that is expected to reach the done stage in pWait number of milliseconds
protected  void assertUnsuccessfulSubmission(java.lang.String pJSDL, long fWait)
          submit a job that is expected reach the fail stage in pWait number of milliseconds
protected abstract  JobManager createJobManager()
          get the jobmanager instance for testing
protected  org.apache.commons.vfs.FileSystemOptions getFileSystemOptions()
          get the file system options
protected  JobManager getJobManager()
          get the job manager for this test
protected  java.lang.String getJSDLString(java.lang.String pPath)
          get the test case JSDL document
protected  void setUp()
          setup the fixture
protected  void tearDown()
          tear down the fixture
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

AbstractJobManagerTestCase

public AbstractJobManagerTestCase(java.lang.String s)
create a new AbstractJobManagerTestCase

Parameters:
s -
Method Detail

getJSDLString

protected java.lang.String getJSDLString(java.lang.String pPath)
get the test case JSDL document

Parameters:
pPath - path to the jsdl document
Returns:
String the parsed JSDL

assertSuccessfulSubmission

protected JobInstance assertSuccessfulSubmission(java.lang.String pJSDL,
                                                 long fWait)
submit a job that is expected to reach the done stage in pWait number of milliseconds

Parameters:
pJSDL - the JSDL document
pWait - the number of milliseconds to wait before declaring the submission as failed

assertTerminatedSubmission

protected JobInstance assertTerminatedSubmission(java.lang.String pJSDL,
                                                 long fWait)
submit a job that is expected to reach the done stage in pWait number of milliseconds

Parameters:
pJSDL - the JSDL document
pWait - the number of milliseconds to wait before declaring the submission as failed

assertUnsuccessfulSubmission

protected void assertUnsuccessfulSubmission(java.lang.String pJSDL,
                                            long fWait)
submit a job that is expected reach the fail stage in pWait number of milliseconds

Parameters:
pJSDL - the JSDL document
pWait - the number of milliseconds to wait before declaring the submission as failed

getFileSystemOptions

protected org.apache.commons.vfs.FileSystemOptions getFileSystemOptions()
get the file system options

Returns:
FileSystemOptions options for this context

setUp

protected void setUp()
              throws java.lang.Exception
setup the fixture

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
tear down the fixture

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

createJobManager

protected abstract JobManager createJobManager()
                                        throws ConfigurationException
get the jobmanager instance for testing

Returns:
JobManager instance
Throws:
ConfigurationException

getJobManager

protected JobManager getJobManager()
                            throws ConfigurationException
get the job manager for this test

Returns:
JobManager the job manager instance to test
Throws:
ConfigurationException


Copyright © 2008. All Rights Reserved.