use of org.apache.karaf.shell.table.ShellTable in project karaf by apache.
the class ShellTableTest method testNoFormatWithCustomSeparator.
@Test
public void testNoFormatWithCustomSeparator() {
ShellTable table = new ShellTable();
table.separator(";");
table.column(new Col("first"));
table.column(new Col("second"));
table.addRow().addContent("first column", "second column");
StringWriter writer = new StringWriter();
PrintStream out = new PrintStream(new WriterOutputStream(writer));
table.print(out, false);
out.flush();
String expected = "first column;second column\n";
Assert.assertEquals(expected, getString(writer));
}
Aggregations