Github user e-kolpakov commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2481#discussion_r169608891
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestValidateCsv.java
---
@@ -333,4 +333,33 @@ public void testMultipleRuns() {
runner.assertTransferCount(ValidateCsv.REL_VALID, 2);
runner.assertTransferCount(ValidateCsv.REL_INVALID, 0);
}
+
+ @Test
+ public void testEscapingLineByLine() {
+ final TestRunner runner = TestRunners.newTestRunner(new
ValidateCsv());
+ runner.setProperty(ValidateCsv.DELIMITER_CHARACTER, ",");
+ runner.setProperty(ValidateCsv.END_OF_LINE_CHARACTER, "\r\n");
+ runner.setProperty(ValidateCsv.QUOTE_CHARACTER, "\"");
+ runner.setProperty(ValidateCsv.HEADER, "true");
--- End diff --
@pvillard31 nitpick - these lines are repeated a lot in this file - maybe
it makes sense to extract them into a method? Outside of scope of this PR
though - pure boyscouting :)
---