Java Code Examples for org.springframework.batch.test.JobLauncherTestUtils

The following examples show how to use org.springframework.batch.test.JobLauncherTestUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: pinpoint   Source File: AlarmJobTest.java    License: Apache License 2.0 7 votes vote down vote up
public static void main(String[] args) throws Exception{
     GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext("/applicationContext-test.xml");
     JobLauncherTestUtils testLauncher = applicationContext.getBean(JobLauncherTestUtils.class);
     
     JobExecution jobExecution = testLauncher.launchJob(getParameters());
     BatchStatus status = jobExecution.getStatus();
     assertEquals(BatchStatus.COMPLETED, status);
     
     applicationContext.close();
}
 
Example 2
Source Project: jump-the-queue   Source File: SpringBatchIntegrationTest.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @param job job to configure
 * @return jobLauncherTestUtils
 */
public JobLauncherTestUtils getJobLauncherTestUtils(Job job) {

  JobLauncherTestUtils jobLauncherTestUtils = new JobLauncherTestUtils();
  jobLauncherTestUtils.setJob(job);
  jobLauncherTestUtils.setJobLauncher(this.jobLauncher);

  return jobLauncherTestUtils;
}
 
Example 3
Source Project: spring-batch-article   Source File: BatchTestConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example 4
Source Project: batchers   Source File: EmployeeJobTestConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example 5
Source Project: tutorials   Source File: TaskletsConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example 6
Source Project: tutorials   Source File: ChunksConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}