fix CSV generator test

This commit is contained in:
Jörg Prante 2024-07-18 09:16:42 +02:00
parent 9a19a2d7c9
commit 1f217c417f

View file

@ -39,13 +39,14 @@ public class GeneratorTest {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
Generator gen = new Generator(writer); Generator gen = new Generator(writer);
gen.keys(Arrays.asList("a", "b", "c")); gen.keys(Arrays.asList("a", "b", "c"));
gen.writeKeys();
for (int i = 0; i < 1; i++) { for (int i = 0; i < 1; i++) {
gen.write("val" + i); gen.write("val" + i);
gen.write("\"Hello, World\""); gen.write("\"Hello, World\"");
gen.write("hey look a line seperator \n"); gen.write("hey look a line seperator \n");
} }
gen.close(); gen.close();
assertEquals("val0,\"\"\"Hello, World\"\"\",\"hey look a line seperator \n\"\n", writer.toString()); assertEquals("a,b,c,\nval0,\"\"\"Hello, World\"\"\",\"hey look a line seperator \n\"\n", writer.toString());
} }
@Test @Test