Search in sources :

Example 16 with RowEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowEntry in project linuxtools by eclipse.

the class FilteredTableDataSetTest method testRemove.

@Test
public void testRemove() {
    assertFalse(dataSet.remove(null));
    assertFalse(dataSet.remove(new RowEntry()));
    assertFalse(dataSet.remove(-1));
    assertFalse(dataSet.remove(10));
    assertEquals(0, dataSet.getEntryCount());
    TableEntry entry = new TableEntry();
    entry.add(new String[] { "1", "2", "3" });
    data.append(entry);
    entry = (TableEntry) data.getEntry(0);
    assertEquals(1, dataSet.getEntryCount());
    assertTrue(dataSet.remove(entry));
    assertEquals(0, dataSet.getEntryCount());
    assertFalse(dataSet.remove(entry));
    assertFalse(dataSet.remove(0));
}
Also used : TableEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry) RowEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowEntry) Test(org.junit.Test)

Aggregations

RowEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowEntry)16 Test (org.junit.Test)11 IDataEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry)3 RowDataSet (org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowDataSet)3 RangeFilter (org.eclipse.linuxtools.systemtap.graphing.core.filters.RangeFilter)3 SortFilter (org.eclipse.linuxtools.systemtap.graphing.core.filters.SortFilter)3 Before (org.junit.Before)3 FilteredRowDataSet (org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.FilteredRowDataSet)2 File (java.io.File)1 IOException (java.io.IOException)1 ImportDataSetHandler (org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ImportDataSetHandler)1 IFilteredDataSet (org.eclipse.linuxtools.systemtap.graphing.core.datasets.IFilteredDataSet)1 TableEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry)1 Point (org.eclipse.swt.graphics.Point)1