use of com.questdb.printer.converter.StripCRLFStringConverter in project questdb by bluestreak01.
the class PrinterTest method testCRLFStripping.
@Test
public void testCRLFStripping() {
try (JournalPrinter printer = new JournalPrinter()) {
printer.setAppender(testAppender).setNullString("").types(String.class, TestEntity.class).v(0).c(new StripCRLFStringConverter(printer)).h("Test String").f("bStr").c(new StripCRLFStringConverter(printer)).h("destination");
printer.out("test string", new TestEntity().setBStr("ok\nbunny"));
printer.out("test\nstring2\r_good", new TestEntity().setBStr("ok foxy"));
testAppender.assertLine("test string\tok bunny", 0);
testAppender.assertLine("test string2_good\tok foxy", 1);
}
}
Aggregations