diff --git a/archetypes/simple-cli/pom.xml b/archetypes/simple-cli/pom.xml index 025df8147..a3a79ad84 100644 --- a/archetypes/simple-cli/pom.xml +++ b/archetypes/simple-cli/pom.xml @@ -29,6 +29,12 @@ 3.8.1 test + + org.springframework + spring-test + ${spring.framework.version} + test + org.springframework.batch spring-batch-samples @@ -83,7 +89,7 @@ 1.1 - integration-test + none exec diff --git a/archetypes/simple-cli/src/test/java/test/jdbc/datasource/InitializingDataSourceFactoryBean.java b/archetypes/simple-cli/src/main/java/test/jdbc/datasource/InitializingDataSourceFactoryBean.java similarity index 100% rename from archetypes/simple-cli/src/test/java/test/jdbc/datasource/InitializingDataSourceFactoryBean.java rename to archetypes/simple-cli/src/main/java/test/jdbc/datasource/InitializingDataSourceFactoryBean.java diff --git a/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java b/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java new file mode 100644 index 000000000..423994e6f --- /dev/null +++ b/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java @@ -0,0 +1,49 @@ +/* + * 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 example; + +import org.springframework.batch.core.launch.JobLauncher; +import org.springframework.test.AbstractDependencyInjectionSpringContextTests; + +import junit.framework.TestCase; + +/** + * @author Dave Syer + * + */ +public class ExampleJobConfigurationTests extends AbstractDependencyInjectionSpringContextTests { + + private JobLauncher jobLauncher; + + /** + * Public setter for the {@link JobLauncher}. + * @param jobLauncher the {@link JobLauncher} to set + */ + public void setJobLauncher(JobLauncher jobLauncher) { + this.jobLauncher = jobLauncher; + } + + /* (non-Javadoc) + * @see org.springframework.test.AbstractSingleSpringContextTests#getConfigLocations() + */ + protected String[] getConfigLocations() { + return new String[] {"example/simpleJob.xml"}; + } + + public void testSimpleProperties() throws Exception { + assertNotNull(jobLauncher); + } +}