Search in sources :

Example 1 with JobLauncherTestUtils

use of org.springframework.batch.test.JobLauncherTestUtils in project pinpoint by naver.

the class AlarmJobTest method main.

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();
}
Also used : JobExecution(org.springframework.batch.core.JobExecution) BatchStatus(org.springframework.batch.core.BatchStatus) JobLauncherTestUtils(org.springframework.batch.test.JobLauncherTestUtils) GenericXmlApplicationContext(org.springframework.context.support.GenericXmlApplicationContext)

Aggregations

BatchStatus (org.springframework.batch.core.BatchStatus)1 JobExecution (org.springframework.batch.core.JobExecution)1 JobLauncherTestUtils (org.springframework.batch.test.JobLauncherTestUtils)1 GenericXmlApplicationContext (org.springframework.context.support.GenericXmlApplicationContext)1