org.springframework.batch.core.repository.dao
Class AbstractStepDaoTests

java.lang.Object
  extended by AbstractTransactionalDataSourceSpringContextTests
      extended by org.springframework.batch.core.repository.dao.AbstractStepDaoTests

public abstract class AbstractStepDaoTests
extends AbstractTransactionalDataSourceSpringContextTests

Tests for step persistence (StepInstanceDao and StepExecutionDao). Because it is very reasonable to assume that there is a foreign key constraint on the JobId of a step, the JobDao is used to create jobs, to have an id for creating steps.

Author:
Lucas Ward, Dave Syer

Field Summary
protected  ExecutionContext executionContext
           
protected  JobExecution jobExecution
           
protected  JobExecutionDao jobExecutionDao
           
protected  JobInstance jobInstance
           
protected  JobInstanceDao jobInstanceDao
           
protected  JobParameters jobParameters
           
protected  Step step1
           
protected  Step step2
           
protected  StepExecution stepExecution
           
protected  StepExecutionDao stepExecutionDao
           
 
Constructor Summary
AbstractStepDaoTests()
           
 
Method Summary
protected  String[] getConfigLocations()
           
protected  void onSetUpInTransaction()
           
 void setJobExecutionDao(JobExecutionDao jobExecutionDao)
           
 void setJobInstanceDao(JobInstanceDao jobInstanceDao)
           
 void setStepExecutionDao(StepExecutionDao stepExecutionDao)
           
 void testGetStepExecution()
           
 void testSaveExecutionContext()
           
 void testSaveStepExecution()
           
 void testSaveStepExecutionAndExecutionContext()
           
 void testUpdateStepExecution()
           
 void testUpdateStepExecutionOptimisticLocking()
           
 void testUpdateStepExecutionVersion()
           
 void testUpdateStepExecutionWithNullId()
           
 void testUpdateStepWithExecutionContext()
           
 void testVersionIsNotNullForStepExecution()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jobInstanceDao

protected JobInstanceDao jobInstanceDao

stepExecutionDao

protected StepExecutionDao stepExecutionDao

jobExecutionDao

protected JobExecutionDao jobExecutionDao

jobInstance

protected JobInstance jobInstance

step1

protected Step step1

step2

protected Step step2

stepExecution

protected StepExecution stepExecution

jobExecution

protected JobExecution jobExecution

jobParameters

protected JobParameters jobParameters

executionContext

protected ExecutionContext executionContext
Constructor Detail

AbstractStepDaoTests

public AbstractStepDaoTests()
Method Detail

setJobInstanceDao

public void setJobInstanceDao(JobInstanceDao jobInstanceDao)

setStepExecutionDao

public void setStepExecutionDao(StepExecutionDao stepExecutionDao)

setJobExecutionDao

public void setJobExecutionDao(JobExecutionDao jobExecutionDao)

getConfigLocations

protected String[] getConfigLocations()

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws Exception
Throws:
Exception

testVersionIsNotNullForStepExecution

public void testVersionIsNotNullForStepExecution()
                                          throws Exception
Throws:
Exception

testUpdateStepWithExecutionContext

public void testUpdateStepWithExecutionContext()

testSaveStepExecution

public void testSaveStepExecution()

testSaveStepExecutionAndExecutionContext

public void testSaveStepExecutionAndExecutionContext()

testUpdateStepExecution

public void testUpdateStepExecution()

testUpdateStepExecutionWithNullId

public void testUpdateStepExecutionWithNullId()

testUpdateStepExecutionVersion

public void testUpdateStepExecutionVersion()
                                    throws Exception
Throws:
Exception

testUpdateStepExecutionOptimisticLocking

public void testUpdateStepExecutionOptimisticLocking()
                                              throws Exception
Throws:
Exception

testSaveExecutionContext

public void testSaveExecutionContext()

testGetStepExecution

public void testGetStepExecution()


Copyright © 2008 SpringSource. All Rights Reserved.