REOPENED - issue BATCH-640: FieldSetMapper.mapLine() should contain the line number

Reverted rownum change in FieldSetMapper
This commit is contained in:
dsyer
2008-06-05 17:24:34 +00:00
parent 85e168e2db
commit e54aafd335
24 changed files with 57 additions and 68 deletions

View File

@@ -90,19 +90,19 @@ public class OrderItemReaderTests extends TestCase {
mapperControl = MockControl.createControl(FieldSetMapper.class);
mapper = (FieldSetMapper)mapperControl.getMock();
//set how mapper should respond - set return values for mapper
mapper.mapLine(headerFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(headerFS);
mapperControl.setReturnValue(order);
mapper.mapLine(customerFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(customerFS);
mapperControl.setReturnValue(customer);
mapper.mapLine(billingFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(billingFS);
mapperControl.setReturnValue(billing);
mapper.mapLine(shippingFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(shippingFS);
mapperControl.setReturnValue(shipping);
mapper.mapLine(billingInfoFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(billingInfoFS);
mapperControl.setReturnValue(billingInfo);
mapper.mapLine(shippingInfoFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(shippingInfoFS);
mapperControl.setReturnValue(shippingInfo);
mapper.mapLine(itemFS, FieldSetMapper.ROW_NUMBER_UNKNOWN);
mapper.mapLine(itemFS);
mapperControl.setReturnValue(item,3);
mapperControl.replay();

View File

@@ -35,7 +35,7 @@ public abstract class AbstractFieldSetMapperTests extends TestCase {
* Assumes the domain object implements sensible <code>equals(Object other)</code>
*/
public void testRegularUse() {
assertEquals(expectedDomainObject(), fieldSetMapper().mapLine(fieldSet(), FieldSetMapper.ROW_NUMBER_UNKNOWN));
assertEquals(expectedDomainObject(), fieldSetMapper().mapLine(fieldSet()));
}
}

View File

@@ -40,11 +40,11 @@ public class TradeFieldSetMapperTests extends AbstractFieldSetMapperTests{
}
public void testBeginRecord() throws Exception {
assertEquals(AggregateItemReader.BEGIN_RECORD, fieldSetMapper().mapLine(new DefaultFieldSet(new String[] {"BEGIN"}), FieldSetMapper.ROW_NUMBER_UNKNOWN));
assertEquals(AggregateItemReader.BEGIN_RECORD, fieldSetMapper().mapLine(new DefaultFieldSet(new String[] {"BEGIN"})));
}
public void testEndRecord() throws Exception {
assertEquals(AggregateItemReader.END_RECORD, fieldSetMapper().mapLine(new DefaultFieldSet(new String[] {"END"}), FieldSetMapper.ROW_NUMBER_UNKNOWN));
assertEquals(AggregateItemReader.END_RECORD, fieldSetMapper().mapLine(new DefaultFieldSet(new String[] {"END"})));
}
}