Oops: forgot to check archetype tests

This commit is contained in:
dsyer
2008-07-21 17:40:54 +00:00
parent ead902f8ad
commit d0a8ca7520
3 changed files with 22 additions and 18 deletions

View File

@@ -36,7 +36,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<import resource="classpath:/META-INF/spring/module-context.xml"/>
<import resource="classpath:/simple-job-launcher-context.xml"/>
</beans>

View File

@@ -15,32 +15,27 @@
*/
package example;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Dave Syer
*
*/
public class ExampleJobConfigurationTests extends AbstractDependencyInjectionSpringContextTests {
@ContextConfiguration(locations={"/launch-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
public class ExampleJobConfigurationTests {
@Autowired
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[] {"/META-INF/spring/module-context.xml"};
}
@Test
public void testSimpleProperties() throws Exception {
assertNotNull(jobLauncher);
}