Polish contribution

Closes gh-3818
pull/3844/head
Stephane Nicoll 9 years ago
parent b69152571e
commit bd15a0c03a

@ -68,6 +68,7 @@ import static org.junit.Assert.assertTrue;
* Tests for {@link BatchAutoConfiguration}. * Tests for {@link BatchAutoConfiguration}.
* *
* @author Dave Syer * @author Dave Syer
* @author Stephane Nicoll
*/ */
public class BatchAutoConfigurationTests { public class BatchAutoConfigurationTests {
@ -224,9 +225,12 @@ public class BatchAutoConfigurationTests {
PropertyPlaceholderAutoConfiguration.class); PropertyPlaceholderAutoConfiguration.class);
this.context.refresh(); this.context.refresh();
assertNotNull(this.context.getBean(JobLauncher.class)); assertNotNull(this.context.getBean(JobLauncher.class));
assertNotNull(this.context.getBean(JobExplorer.class));
assertEquals(0, new JdbcTemplate(this.context.getBean(DataSource.class)) assertEquals(0, new JdbcTemplate(this.context.getBean(DataSource.class))
.queryForList("select * from PREFIX_JOB_EXECUTION").size()); .queryForList("select * from PREFIX_JOB_EXECUTION").size());
JobExplorer jobExplorer = this.context.getBean(JobExplorer.class);
assertEquals(0, jobExplorer.findRunningJobExecutions("test").size());
JobRepository jobRepository = this.context.getBean(JobRepository.class);
assertNull(jobRepository.getLastJobExecution("test", new JobParameters()));
} }
@Configuration @Configuration

Loading…
Cancel
Save