mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Update tests now that BulkLoadValueMapper removes non-valid possible-value values from record.
This commit is contained in:
@ -149,10 +149,13 @@ class BulkLoadValueMapperTest extends BaseTest
|
|||||||
testPossibleValue("IL", 1, false);
|
testPossibleValue("IL", 1, false);
|
||||||
testPossibleValue("il", 1, false);
|
testPossibleValue("il", 1, false);
|
||||||
|
|
||||||
testPossibleValue(512, 512, true); // an id, but not in the PVS
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
testPossibleValue("USA", "USA", true);
|
// unmappables - should have a null value (this used to not be the case - the bad-value would come through...) //
|
||||||
testPossibleValue(true, true, true);
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
testPossibleValue(new BigDecimal("4.7"), new BigDecimal("4.7"), true);
|
testPossibleValue(512, null, true); // an int, but not in the PVS
|
||||||
|
testPossibleValue("USA", null, true);
|
||||||
|
testPossibleValue(true, null, true);
|
||||||
|
testPossibleValue(new BigDecimal("4.7"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ class FlatRowsToRecordTest extends BaseTest
|
|||||||
List<QRecord> records = rowsToRecord.nextPage(fileToRows, header, mapping, Integer.MAX_VALUE);
|
List<QRecord> records = rowsToRecord.nextPage(fileToRows, header, mapping, Integer.MAX_VALUE);
|
||||||
assertEquals(5, records.size());
|
assertEquals(5, records.size());
|
||||||
assertEquals(List.of("Homer", "Marge", "Bart", "Ned", "Mr."), getValues(records, "firstName"));
|
assertEquals(List.of("Homer", "Marge", "Bart", "Ned", "Mr."), getValues(records, "firstName"));
|
||||||
assertEquals(ListBuilder.of(1, 2, null, "Not a state", 5), getValues(records, "homeStateId"));
|
assertEquals(ListBuilder.of(1, 2, null, null, null), getValues(records, "homeStateId"));
|
||||||
|
|
||||||
assertThat(records.get(0).getErrors()).isNullOrEmpty();
|
assertThat(records.get(0).getErrors()).isNullOrEmpty();
|
||||||
assertThat(records.get(1).getErrors()).isNullOrEmpty();
|
assertThat(records.get(1).getErrors()).isNullOrEmpty();
|
||||||
|
Reference in New Issue
Block a user