use of org.eclipse.tracecompass.internal.provisional.tmf.core.model.TableColumnDescriptor in project tracecompass by tracecompass.
the class TableColumnDescriptorTest method test.
// ------------------------------------------------------------------------
// Tests
// ------------------------------------------------------------------------
/**
* Test @{link TableColumnDescriptor) construction using {@link Builder}.
*/
@Test
public void test() {
TableColumnDescriptor.Builder builder = new TableColumnDescriptor.Builder();
ITableColumnDescriptor desc = builder.setText(COLUMN_TEXT0).build();
assertEquals("Column header", COLUMN_TEXT0, desc.getText());
assertTrue("Empty tooltip", desc.getTooltip().isEmpty());
builder = new TableColumnDescriptor.Builder();
desc = builder.setText(COLUMN_TEXT0).setTooltip(COLUMN_TOOLTIP0).build();
assertEquals("Column header", COLUMN_TEXT0, desc.getText());
assertEquals("Column tooltip", COLUMN_TOOLTIP0, desc.getTooltip());
builder = new TableColumnDescriptor.Builder();
desc = builder.setTooltip(COLUMN_TOOLTIP0).build();
assertTrue("Empty Text", desc.getText().isEmpty());
assertEquals("Column tooltip", COLUMN_TOOLTIP0, desc.getTooltip());
}
use of org.eclipse.tracecompass.internal.provisional.tmf.core.model.TableColumnDescriptor in project tracecompass by tracecompass.
the class TableColumnDescriptorTest method testToString.
/**
* Test {@link TableColumnDescriptor#toString()}
*/
@Test
public void testToString() {
TableColumnDescriptor.Builder builder = new TableColumnDescriptor.Builder();
ITableColumnDescriptor desc = builder.setText(COLUMN_TEXT0).setTooltip(COLUMN_TOOLTIP0).build();
assertEquals(TO_STRING, "[text=Name tooltip=Tooltip]", desc.toString());
}
Aggregations