use of org.springframework.batch.core.explore.JobExplorer in project spring-boot by spring-projects.
the class BatchAutoConfigurationTests method testNoDatabase.
@Test
public void testNoDatabase() throws Exception {
this.context = new AnnotationConfigApplicationContext();
this.context.register(TestCustomConfiguration.class, BatchAutoConfiguration.class, TransactionAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(JobLauncher.class)).isNotNull();
JobExplorer explorer = this.context.getBean(JobExplorer.class);
assertThat(explorer).isNotNull();
assertThat(explorer.getJobInstances("job", 0, 100)).isEmpty();
}
Aggregations