sfc-gh-ktrysinski commented on code in PR #10058:
URL: https://github.com/apache/nifi/pull/10058#discussion_r2213349098
##########
nifi-extension-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/processors/excel/TestSplitExcel.java:
##########
@@ -239,6 +241,38 @@ void testCopyDateTime() throws Exception {
}
}
+ @Test
+ void testHyperlinks() throws IOException {
+ final Path hyperlinksFile =
Paths.get("src/test/resources/excel/hyperlinks.xlsx");
+ runner.enqueue(hyperlinksFile);
+
+ runner.run();
+
+ runner.assertTransferCount(SplitExcel.REL_SPLIT, 1);
+ runner.assertTransferCount(SplitExcel.REL_ORIGINAL, 1);
+ runner.assertTransferCount(SplitExcel.REL_FAILURE, 0);
+
+ final MockFlowFile flowFile =
runner.getFlowFilesForRelationship(SplitExcel.REL_SPLIT).getFirst();
+ try (XSSFWorkbook workbook = new
XSSFWorkbook(flowFile.getContentStream())) {
+ final Sheet sheet = workbook.getSheetAt(0);
+ assertEquals("Sheet1", sheet.getSheetName());
+
+ final List<XSSFHyperlink> hyperlinks = (List<XSSFHyperlink>)
sheet.getHyperlinkList();
+ Assertions.assertIterableEquals(
Review Comment:
Done
--
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]