BAEL-2499 Write to CSV in Java - updated (#6135)

* example code for Article How to Write to a CSV File in Java

* Updated to use a Stream

* Updated to use Streams in convertToCSV for BAEL-2499
This commit is contained in:
Amy DeGregorio
2019-01-15 15:31:37 -05:00
committed by Grzegorz Piwowarek
parent 7397ac956c
commit 0bfa50825b
2 changed files with 7 additions and 11 deletions
@@ -65,7 +65,7 @@ public class WriteCsvFileExampleUnitTest {
}
@Test
public void givenBufferedWriter_whenWriteLine_thenOutputCreated() {
public void givenDataArray_whenConvertToCSV_thenOutputCreated() {
List<String[]> dataLines = new ArrayList<String[]>();
dataLines.add(new String[] { "John", "Doe", "38", "Comment Data\nAnother line of comment data" });
dataLines.add(new String[] { "Jane", "Doe, Jr.", "19", "She said \"I'm being quoted\"" });