.toString(), '_', Alignment.Left); table = generateMeterResult("", meter, classRes, table); table.addLine('-'); execBuilder3.append("Related annotation: ").append(exec.getRelatedAnno().getSimpleName()); table.addHeader(execBuilder3.toString(), ' ', Alignment.Left); table.addLine('-'); table.addLine('='); out.println(table.toString());
zero.addLine('-'); zero.addRow(string); zero.addLine('='); zero.addRow(new String[] { numbers[0].toString(), numbers[1].toString(), numbers[2].toString(), numbers[3].toString(), numbers[4].toString() }); zero.addLine('-'); final String result = zero.toString(); final StringBuilder expected = new StringBuilder();
/** * Test method for {@link org.perfidix.ouput.asciitable.NiceTable#addLine(char)}. */ @Test public void testAddLine() { table.addLine('*'); assertEquals("Test for adding a line", "|******************************|\n", table.toString()); }
/** * Test method for {@link org.perfidix.ouput.asciitable.NiceTable#toString()}. */ @Test public void testToString() { table.addHeader("This is a header"); table.addRow(new String[] { "This", "is", "one", "data" }); table.addLine('-'); table.addRow(new String[] { "This", "is", "another", "data" }); assertEquals( "Test for a complete table", "|= This is a header ===========================|\n| This | is | one | data |\n|----------------------------------------------|\n| This | is | another | data |\n", table.toString()); }