org.springframework.batch.test.JobLauncherTestUtils Java Examples

The following examples show how to use org.springframework.batch.test.JobLauncherTestUtils. 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 File: AlarmJobTest.java    From pinpoint with Apache License 2.0 8 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 File: SpringBatchIntegrationTest.java    From jump-the-queue with 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 File: BatchTestConfiguration.java    From spring-batch-article with MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example #4
Source File: EmployeeJobTestConfig.java    From batchers with Apache License 2.0 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example #5
Source File: TaskletsConfig.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}
 
Example #6
Source File: ChunksConfig.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public JobLauncherTestUtils jobLauncherTestUtils() {
    return new JobLauncherTestUtils();
}