mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 21:20:45 +00:00
CE-1955 - Add rowNo to BulkLoadFileRow, set by FileToRowsInterface objects
This commit is contained in:
@ -52,8 +52,8 @@ class CsvFileToRowsTest extends BaseTest
|
||||
BulkLoadFileRow headerRow = fileToRowsInterface.next();
|
||||
BulkLoadFileRow bodyRow = fileToRowsInterface.next();
|
||||
|
||||
assertEquals(new BulkLoadFileRow(new String[] { "one", "two", "three" }), headerRow);
|
||||
assertEquals(new BulkLoadFileRow(new String[] { "1", "2", "3", "4" }), bodyRow);
|
||||
assertEquals(new BulkLoadFileRow(new String[] { "one", "two", "three" }, 1), headerRow);
|
||||
assertEquals(new BulkLoadFileRow(new String[] { "1", "2", "3", "4" }, 2), bodyRow);
|
||||
assertFalse(fileToRowsInterface.hasNext());
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,6 @@ public class TestFileToRows extends AbstractIteratorBasedFileToRows<Serializable
|
||||
@Override
|
||||
public BulkLoadFileRow makeRow(Serializable[] values)
|
||||
{
|
||||
return (new BulkLoadFileRow(values));
|
||||
return (new BulkLoadFileRow(values, getRowNo()));
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ class XlsxFileToRowsTest extends BaseTest
|
||||
BulkLoadFileRow headerRow = fileToRowsInterface.next();
|
||||
BulkLoadFileRow bodyRow = fileToRowsInterface.next();
|
||||
|
||||
assertEquals(new BulkLoadFileRow(new String[] {"Id", "First Name", "Last Name", "Birth Date"}), headerRow);
|
||||
assertEquals(new BulkLoadFileRow(new Serializable[] {1, "Darin", "Jonson", LocalDateTime.of(1980, Month.JANUARY, 31, 0, 0)}), bodyRow);
|
||||
assertEquals(new BulkLoadFileRow(new String[] {"Id", "First Name", "Last Name", "Birth Date"}, 1), headerRow);
|
||||
assertEquals(new BulkLoadFileRow(new Serializable[] {1, "Darin", "Jonson", LocalDateTime.of(1980, Month.JANUARY, 31, 0, 0)}, 2), bodyRow);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// make sure there's at least a limit (less than 20) to how many more rows there are //
|
||||
|
Reference in New Issue
Block a user