dan-s1 commented on code in PR #9379:
URL: https://github.com/apache/nifi/pull/9379#discussion_r1799816503


##########
nifi-extension-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/excel/TestExcelSchemaInference.java:
##########
@@ -50,69 +45,54 @@ public class TestExcelSchemaInference {
     private static final String EXPECTED_SECOND_FIELD_NAME = 
ExcelUtils.FIELD_NAME_PREFIX + "1";
     private static final String EXPECTED_THIRD_FIELD_NAME = 
ExcelUtils.FIELD_NAME_PREFIX + "2";
     private static final String EXPECTED_FOURTH_FIELD_NAME = 
ExcelUtils.FIELD_NAME_PREFIX + "3";
+
+    private static final String SIMPLE_FORMATTING_PATH = 
"/excel/simpleDataFormatting.xlsx";
+
     private final TimeValueInference timestampInference = new 
TimeValueInference("MM/dd/yyyy", "HH:mm:ss.SSS", "yyyy/MM/dd/ HH:mm");

Review Comment:
   BTW I noticed I could make this a mock using the `@Mock` annotation without 
any value and the unit tests would still work i.e.
   
   ```
   @Mock
    TimeValueInference timestampInference ;
   ```
   This indicates to me that for the  the excel spreadsheet referenced in the 
unit test  the `TimeValueInference` variable  is  never used since all the 
cells in the `Timestamps` column  have a  date format and not a string format 
(except for the first cell which has the string `Timestamps`). It would be 
worthwhile to change at least one cell to a string format and have one of the 
date, time or timestamp formats match it so the code in 
`StandardCellFieldTypeReader` line 93 is exercised.
   



-- 
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]

Reply via email to