Search in sources :

Example 1 with RowHideShowLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.RowHideShowLayerFixture in project nebula.widgets.nattable by eclipse.

the class RowHideShowLayerTest method showRowPositions.

@Test
public void showRowPositions() throws Exception {
    this.rowHideShowLayer = new RowHideShowLayerFixture(new DataLayerFixture(2, 10, 100, 20));
    assertEquals(10, this.rowHideShowLayer.getRowCount());
    this.rowHideShowLayer.hideRowPositions(Arrays.asList(3, 4, 5));
    assertEquals(7, this.rowHideShowLayer.getRowCount());
    assertEquals(-1, this.rowHideShowLayer.getRowPositionByIndex(3));
    assertEquals(-1, this.rowHideShowLayer.getRowPositionByIndex(4));
    this.rowHideShowLayer.showRowIndexes(Arrays.asList(3, 4));
    assertEquals(9, this.rowHideShowLayer.getRowCount());
    assertEquals(3, this.rowHideShowLayer.getRowPositionByIndex(3));
    assertEquals(4, this.rowHideShowLayer.getRowPositionByIndex(4));
}
Also used : RowHideShowLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.RowHideShowLayerFixture) DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) Test(org.junit.Test)

Aggregations

DataLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture)1 RowHideShowLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.RowHideShowLayerFixture)1 Test (org.junit.Test)1