org.ourgrid.mygrid.scheduler.test
Class JobTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.ourgrid.mygrid.scheduler.test.JobTest
All Implemented Interfaces:
junit.framework.Test, FastTest, PreCommitTest, SchedulerFastTest, SchedulerPreCommitTest, SelectiveTest, StressTest

public class JobTest
extends junit.framework.TestCase
implements SchedulerFastTest


Constructor Summary
JobTest(java.lang.String name)
          Constructor for JobTest.
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testCancel()
           
 void testGetAvailableTasks()
           
 void testGetNewReplica()
           
 void testGetState()
          Tests if, according to the Tasks states, a Job is in the correct state.
 void testNewJobWithNullJobSpec()
           
 void testNewJobWithNullTaskSpecs()
          This method tests if the JobSpec is verified during its construction.
 void testReplicaFailed()
           
 void testReplicaFinished()
           
 void testSetReplicaState()
           
 
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
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Constructor Detail

JobTest

public JobTest(java.lang.String name)
Constructor for JobTest.

Parameters:
name - Test name
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testReplicaFinished

public void testReplicaFinished()

testReplicaFailed

public void testReplicaFailed()

testCancel

public void testCancel()

testSetReplicaState

public void testSetReplicaState()

testGetNewReplica

public void testGetNewReplica()

testNewJobWithNullJobSpec

public void testNewJobWithNullJobSpec()

testNewJobWithNullTaskSpecs

public void testNewJobWithNullTaskSpecs()
This method tests if the JobSpec is verified during its construction. The validated parameter is the list of Tasks Specs.


testGetAvailableTasks

public void testGetAvailableTasks()
                           throws TaskSpecificationException,
                                  JobSpecificationException
Throws:
TaskSpecificationException
JobSpecificationException

testGetState

public void testGetState()
                  throws TaskSpecificationException,
                         JobSpecificationException
Tests if, according to the Tasks states, a Job is in the correct state. It tests a several combination of Tasks states.

Throws:
TaskSpecificationException
JobSpecificationException