org.unitils.spring.batch
Class BatchTestImpl

java.lang.Object
  extended by org.unitils.spring.batch.BatchTestImpl
All Implemented Interfaces:
BatchTest

public class BatchTestImpl
extends Object
implements BatchTest

Implements the BatchTest by a custom soap ui implementation. This expects a project location (soap ui project xml file) , an suite name and the name of the testCase. All should be exact.

Since:
1.0.0
Author:
Jef Verelst, Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

Constructor Summary
BatchTestImpl(org.springframework.context.ApplicationContext contextFile, String jobName, int exitCode)
           
BatchTestImpl(org.springframework.context.ApplicationContext context, String jobName, String parameter, BatchOption option, int exitCode)
          Constructor to be able to test with a parameter and an option (-restart, -stop, etc...), allowing for testing the restart of a job for instance.
BatchTestImpl(org.springframework.context.ApplicationContext context, String jobName, String parameter, int exitCode)
          Constructor to be able to test with a parameter, allowing for testing one job several time without clearing database over and over again.
 
Method Summary
 void launchJob()
          This method launches the Spring Batch job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchTestImpl

public BatchTestImpl(org.springframework.context.ApplicationContext contextFile,
                     String jobName,
                     int exitCode)
              throws org.unitils.core.UnitilsException
Parameters:
contextFile -
jobName -
exitCode -
Throws:
org.unitils.core.UnitilsException

BatchTestImpl

public BatchTestImpl(org.springframework.context.ApplicationContext context,
                     String jobName,
                     String parameter,
                     int exitCode)
              throws org.unitils.core.UnitilsException
Constructor to be able to test with a parameter, allowing for testing one job several time without clearing database over and over again. A job might have to be able to run consecutively.

Parameters:
context - place of the job xml Spring application context
jobName - the name the job is known for in this context
parameter - the additional parameter (added to the job as param=parameter)
exitCode - the exit code to check
Throws:
org.unitils.core.UnitilsException - when something unexpected happens

BatchTestImpl

public BatchTestImpl(org.springframework.context.ApplicationContext context,
                     String jobName,
                     String parameter,
                     BatchOption option,
                     int exitCode)
              throws org.unitils.core.UnitilsException
Constructor to be able to test with a parameter and an option (-restart, -stop, etc...), allowing for testing the restart of a job for instance.

Parameters:
context -
jobName - the name the job is known for in this context
parameter - the additional parameter (added to the job as param=parameter)
exitCode - the exit code to check
option - the Batch option to add to the execution
Throws:
org.unitils.core.UnitilsException - when something unexpected happens
Method Detail

launchJob

public void launchJob()
               throws Exception
Description copied from interface: BatchTest
This method launches the Spring Batch job.

Specified by:
launchJob in interface BatchTest
Throws:
Exception


Copyright © 2013. All Rights Reserved.