OPEN - issue BATCH-911: Consolidate Samples
http://jira.springframework.org/browse/BATCH-911 Fixed issues with case in iosample tests.
This commit is contained in:
@@ -29,8 +29,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/delimited.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/delimited.xml" })
|
||||
public class DelimitedFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/delimitedOutput.csv";
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/fixedLength.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/fixedLength.xml" })
|
||||
public class FixedLengthFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/fixedLengthOutput.txt";
|
||||
|
||||
@@ -34,8 +34,8 @@ import org.springframework.test.jdbc.SimpleJdbcTestUtils;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/jdbcCursor.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/jdbcCursor.xml" })
|
||||
public class JdbcCursorFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private SimpleJdbcTemplate simpleJdbcTemplate;
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/multiLine.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/multiLine.xml" })
|
||||
public class MultiLineFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/multiLineOutput.txt";
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/multiRecordType.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/multiRecordType.xml" })
|
||||
public class MultiRecordTypeFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/multiRecordTypeOutput.txt";
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/multiResource.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/multiResource.xml" })
|
||||
public class MultiResourceFunctionalTests extends AbstractJobTests {
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @since 2.0
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/ioSampleJob.xml",
|
||||
"/jobs/ioSample/xml.xml" })
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/iosampleJob.xml",
|
||||
"/jobs/iosample/xml.xml" })
|
||||
public class XmlFunctionalTests extends AbstractJobTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/output.xml";
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.batch.sample.domain.trade.Trade;
|
||||
public class DelegatingTradeLineAggregatorTests {
|
||||
|
||||
@Test
|
||||
public void testAggregate() {
|
||||
public void testAggregateTrade() {
|
||||
BeanWrapperFieldExtractor<Trade> tradeExtractor = new BeanWrapperFieldExtractor<Trade>();
|
||||
tradeExtractor.setNames(new String[] { "isin", "quantity", "price", "customer" });
|
||||
|
||||
@@ -41,7 +41,7 @@ public class DelegatingTradeLineAggregatorTests {
|
||||
tradeAggregator.setFieldExtractor(tradeExtractor);
|
||||
|
||||
BeanWrapperFieldExtractor<CustomerCredit> customerExtractor = new BeanWrapperFieldExtractor<CustomerCredit>();
|
||||
tradeExtractor.setNames(new String[] { "id", "name", "credit" });
|
||||
customerExtractor.setNames(new String[] { "id", "name", "credit" });
|
||||
|
||||
DelimitedLineAggregator<CustomerCredit> customerAggregator = new DelimitedLineAggregator<CustomerCredit>();
|
||||
customerAggregator.setFieldExtractor(customerExtractor);
|
||||
@@ -56,4 +56,9 @@ public class DelegatingTradeLineAggregatorTests {
|
||||
CustomerCredit c = new CustomerCredit(256, "customer1", new BigDecimal("3200.00"));
|
||||
assertEquals("256,customer1,3200.00", aggregator.aggregate(c));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAggregateCustomer(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user