org.springframework.batch.core.repository.support
Class SimpleJobRepositoryIntegrationTests

java.lang.Object
  extended by AbstractTransactionalDataSourceSpringContextTests
      extended by org.springframework.batch.core.repository.support.SimpleJobRepositoryIntegrationTests

public class SimpleJobRepositoryIntegrationTests
extends AbstractTransactionalDataSourceSpringContextTests

Repository tests using JDBC DAOs (rather than mocks).

Author:
Robert Kasanicky

Constructor Summary
SimpleJobRepositoryIntegrationTests()
           
 
Method Summary
protected  String[] getConfigLocations()
           
 void setJobRepository(SimpleJobRepository jobRepository)
           
 void testCreateAndFind()
          Create two job executions for same job+parameters tuple.
 void testCreateAndFindWithNoStartDate()
          Create two job executions for same job+parameters tuple.
 void testGetStepExecutionCountAndLastStepExecution()
          Save multiple StepExecutions for the same step and check the returned count and last execution are correct.
 void testOnlyOneJobExecutionAllowedRunning()
          If JobExecution is already running, exception will be thrown in attempt to create new execution.
 void testRunNonRestartableJobInstanceTwice()
          Non-restartable JobInstance can be run only once - attempt to run existing non-restartable JobInstance causes error.
 void testSaveExecutionContext()
          Save execution context and retrieve it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleJobRepositoryIntegrationTests

public SimpleJobRepositoryIntegrationTests()
Method Detail

getConfigLocations

protected String[] getConfigLocations()

setJobRepository

public void setJobRepository(SimpleJobRepository jobRepository)

testCreateAndFind

public void testCreateAndFind()
                       throws Exception
Create two job executions for same job+parameters tuple. Check both executions belong to the same job instance and job.

Throws:
Exception

testCreateAndFindWithNoStartDate

public void testCreateAndFindWithNoStartDate()
                                      throws Exception
Create two job executions for same job+parameters tuple. Check both executions belong to the same job instance and job.

Throws:
Exception

testRunNonRestartableJobInstanceTwice

public void testRunNonRestartableJobInstanceTwice()
                                           throws Exception
Non-restartable JobInstance can be run only once - attempt to run existing non-restartable JobInstance causes error.

Throws:
Exception

testGetStepExecutionCountAndLastStepExecution

public void testGetStepExecutionCountAndLastStepExecution()
                                                   throws Exception
Save multiple StepExecutions for the same step and check the returned count and last execution are correct.

Throws:
Exception

testSaveExecutionContext

public void testSaveExecutionContext()
                              throws Exception
Save execution context and retrieve it.

Throws:
Exception

testOnlyOneJobExecutionAllowedRunning

public void testOnlyOneJobExecutionAllowedRunning()
                                           throws Exception
If JobExecution is already running, exception will be thrown in attempt to create new execution.

Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.