Copilot commented on code in PR #893:
URL: https://github.com/apache/fesod/pull/893#discussion_r3048903230
##########
fesod-sheet/src/test/java/org/apache/fesod/sheet/converter/CustomConverterTest.java:
##########
@@ -83,6 +88,28 @@ void t04Write12() throws Exception {
writeFile(converterExcelFile12);
}
+ @Test
+ void t05GlobalConverterInSheetHolder() throws Exception {
+ TimestampStringConverter timestampStringConverter = new
TimestampStringConverter();
+ ExcelWriter excelWriter = FesodSheet.write(converterExcelFile13)
+ .registerConverter(timestampStringConverter)
+ .build();
+ excelWriter.write(data(), new
ExcelWriterSheetBuilder().sheetNo(0).build());
+ WriteSheetHolder sheetHolder =
excelWriter.writeContext().writeSheetHolder();
+ Map<ConverterKeyBuild.ConverterKey, Converter<?>> sheetConverterMap =
sheetHolder.converterMap();
+ excelWriter.finish();
+
Assertions.assertTrue(sheetConverterMap.containsKey(ConverterKeyBuild.buildKey(
+ timestampStringConverter.supportJavaTypeKey(),
timestampStringConverter.supportExcelTypeKey())));
+ }
+
+ @Test
+ void t06GlobalConverterWriteWithoutAnnotation() throws Exception {
+ FesodSheet.write(converterCsvFile14)
+ .registerConverter(new TimestampStringConverter())
+ .sheet()
+ .doWrite(globalData());
+ }
Review Comment:
Test name `t06GlobalConverterWriteWithoutAnnotation` is misleading because
`GlobalConverterWriteData` uses `@ExcelProperty`. Consider renaming the test to
reflect the actual intent (e.g., “without converter annotation” / “without
field-level converter config”).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]