org.unitils.spring.batch.annotations
Annotation Type BatchTestEnvironment


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
@Inherited
public @interface BatchTestEnvironment

Creates a BatchTestEnvironment . When using this annotation on an object it shall only have effect when the object is of type BatchTestEnvironment

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

Required Element Summary
 String job
          The job to be executed in the context file.
 
Optional Element Summary
 String contextFile
          The Spring context in which the batch project is defined.
 int exitCode
          The expected exit code (defaults to 0).
 String jobParameters
          The jobParameters to send to the job execution.
 BatchOption option
          The option to send with the job execution, allowing for testing restart for instance, default it is set to none, meaning no options will be sent to the job execution.
 boolean parameter
          The parameter to send with the job execution, allowing for testing multiple new executions of same job.
 

Element Detail

job

public abstract String job
The job to be executed in the context file.

Returns:
String

contextFile

public abstract String contextFile
The Spring context in which the batch project is defined. When not filling it in we expect a application context form the SpringModule to be present.

Returns:
String
Default:
""

exitCode

public abstract int exitCode
The expected exit code (defaults to 0). Tests will fail when the exit code does not match.

Returns:
Integer
Default:
0

parameter

public abstract boolean parameter
The parameter to send with the job execution, allowing for testing multiple new executions of same job. If true it will send simply a date to the batch execution. If true and the jobParameters are filled in then it will take those parameters.

Returns:
Boolean
Default:
false

jobParameters

public abstract String jobParameters
The jobParameters to send to the job execution. If they are not empty they will be used.

Returns:
String
Default:
""

option

public abstract BatchOption option
The option to send with the job execution, allowing for testing restart for instance, default it is set to none, meaning no options will be sent to the job execution.

Returns:
BatchOption
Default:
org.unitils.spring.batch.BatchOption.NONE


Copyright © 2014. All Rights Reserved.