diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java index d33fcbf3f..3d1538f52 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java @@ -85,20 +85,6 @@ public class DefaultJobLoaderTests { loader.afterPropertiesSet(); } - @Test - public void createWithSimpleJobRegistry() { - final DefaultJobLoader loader = new DefaultJobLoader(); - loader.setJobRegistry(new JobRegistryMock()); - - try { - loader.afterPropertiesSet(); - fail("Should have failed to create job loader without a step registry (" + - "and the job registry could not fulfill that role)"); - } catch (IllegalArgumentException e) { - // OK - } - } - @Test public void testRegistryUpdated() throws DuplicateJobException { GenericApplicationContextFactory factory = new GenericApplicationContextFactory( @@ -135,7 +121,7 @@ public class DefaultJobLoaderTests { @Test public void testNoStepRegistryAvailable() throws DuplicateJobException { final JobLoader loader = new DefaultJobLoader(jobRegistry); - ClassPathXmlApplicationContextFactory factory = new ClassPathXmlApplicationContextFactory( + GenericApplicationContextFactory factory = new GenericApplicationContextFactory( new ClassPathResource("job-context-with-steps.xml", getClass())); loader.load(factory); // No step registry available so just registering the jobs @@ -144,7 +130,7 @@ public class DefaultJobLoaderTests { @Test public void testLoadWithJobThatIsNotAStepLocator() throws DuplicateJobException { - ClassPathXmlApplicationContextFactory factory = new ClassPathXmlApplicationContextFactory( + GenericApplicationContextFactory factory = new GenericApplicationContextFactory( new ByteArrayResource(BASIC_JOB_XML.getBytes())); try { jobLoader.load(factory); @@ -159,7 +145,7 @@ public class DefaultJobLoaderTests { @Test public void testLoadWithJobThatIsNotAStepLocatorNoStepRegistry() throws DuplicateJobException { final JobLoader loader = new DefaultJobLoader(jobRegistry); - ClassPathXmlApplicationContextFactory factory = new ClassPathXmlApplicationContextFactory( + GenericApplicationContextFactory factory = new GenericApplicationContextFactory( new ByteArrayResource(BASIC_JOB_XML.getBytes())); try { loader.load(factory); diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-separate-steps.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-separate-steps.xml index c8f9292c5..5d2c1f1b3 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-separate-steps.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-separate-steps.xml @@ -2,7 +2,7 @@ + http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> Declares two jobs with a set of steps. Also declares two steps that are not attached to any job diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-steps.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-steps.xml index bb3bc8ba1..fd4d00de3 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-steps.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/job-context-with-steps.xml @@ -2,7 +2,7 @@ + http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context-autoregister.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context-autoregister.xml index 98505c6c1..c721c2a7a 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context-autoregister.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context-autoregister.xml @@ -2,7 +2,7 @@ + http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context.xml index 17f09758d..cfd59c8e7 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/support/trivial-context.xml @@ -2,7 +2,7 @@ + http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">