Fix tests some more

This commit is contained in:
dsyer
2009-07-16 08:57:05 +00:00
parent 622487c7d6
commit 28de6374bb
7 changed files with 11 additions and 6 deletions

View File

@@ -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");

View File

@@ -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());
}
}

View File

@@ -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";