Fix tests some more
This commit is contained in:
@@ -29,7 +29,7 @@ public class ClassPathXmlJobRegistryContextTests {
|
||||
public void testLocateJob() throws Exception{
|
||||
|
||||
Collection<String> names = registry.getJobNames();
|
||||
assertEquals(1, names.size());
|
||||
assertEquals(2, names.size());
|
||||
assertTrue(names.contains("test-job"));
|
||||
|
||||
Job job = registry.getJob("test-job");
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.Collection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.configuration.DuplicateJobException;
|
||||
import org.springframework.batch.core.launch.NoSuchJobException;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
@@ -59,7 +58,7 @@ public class ClassPathXmlJobRegistryTests {
|
||||
registry.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@Test(expected = DuplicateJobException.class)
|
||||
@Test
|
||||
public void testDuplicateJobsInFile() throws Exception {
|
||||
|
||||
Resource[] jobPaths = new Resource[] { new ClassPathResource(
|
||||
@@ -69,5 +68,6 @@ public class ClassPathXmlJobRegistryTests {
|
||||
applicationContext.refresh();
|
||||
registry.setApplicationContext(applicationContext);
|
||||
registry.afterPropertiesSet();
|
||||
assertEquals(2, registry.getJobNames().size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.springframework.util.ClassUtils;
|
||||
public class CommandLineJobRunnerTests {
|
||||
|
||||
private String jobPath = ClassUtils.addResourcePathToPackagePath(CommandLineJobRunnerTests.class,
|
||||
"job-with-environment.xml");
|
||||
"launcher-with-environment.xml");
|
||||
|
||||
private String jobName = "test-job";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user