OPEN - issue BATCH-541: pull commit interval from the job parameters

Move ClassPathXmlApplicationContextJobFactory implementation from samples to core.
This commit is contained in:
dsyer
2008-06-02 13:14:58 +00:00
parent e64c3cdf1f
commit 90465f9ce0
6 changed files with 48 additions and 4 deletions

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.configuration.support;
import org.springframework.util.ClassUtils;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class ClassPathXmlApplicationContextJobFactoryTests extends TestCase {
private ClassPathXmlApplicationContextJobFactory factory = new ClassPathXmlApplicationContextJobFactory("test-job", ClassUtils.addResourcePathToPackagePath(getClass(), "test-context.xml"), null);
/**
* Test method for {@link org.springframework.batch.core.configuration.support.ClassPathXmlApplicationContextJobFactory#createJob()}.
*/
public void testCreateJob() {
assertNotNull(factory.createJob());
}
/**
* Test method for {@link org.springframework.batch.core.configuration.support.ClassPathXmlApplicationContextJobFactory#getJobName()}.
*/
public void testGetJobName() {
assertEquals("test-job", factory.getJobName());
}
}