use of org.eclipse.nebula.widgets.nattable.test.fixture.LayerEventFixture in project nebula.widgets.nattable by eclipse.
the class EventConflaterChainTest method shouldStartUpAllConflaterTasksAtTheEndOfTheInterval.
@Test
public void shouldStartUpAllConflaterTasksAtTheEndOfTheInterval() throws Exception {
this.conflaterChain.start();
this.conflaterChain.addEvent(new LayerEventFixture());
this.conflaterChain.addEvent(new LayerEventFixture());
Thread.sleep(100);
assertEquals(0, this.conflater1.getCount());
assertEquals(0, this.conflater2.getCount());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.LayerEventFixture in project nebula.widgets.nattable by eclipse.
the class VisualChangeEventConflaterTest method shouldAccumulateEvents.
@Test
public void shouldAccumulateEvents() throws Exception {
NatTableFixture natTable = new NatTableFixture();
VisualChangeEventConflater conflater = new VisualChangeEventConflater(natTable);
EventConflaterChain chain = new EventConflaterChain();
chain.add(conflater);
conflater.addEvent(new LayerEventFixture());
conflater.addEvent(new LayerEventFixture());
assertEquals(2, conflater.getCount());
chain.start();
Thread.sleep(EventConflaterChain.DEFAULT_INITIAL_DELAY + 100);
assertEquals(0, conflater.getCount());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.LayerEventFixture in project nebula.widgets.nattable by eclipse.
the class EventConflaterChainTest method shouldAddEventsToAllChildren.
@Test
public void shouldAddEventsToAllChildren() throws Exception {
this.conflaterChain.addEvent(new LayerEventFixture());
this.conflaterChain.addEvent(new LayerEventFixture());
assertEquals(2, this.conflater1.getCount());
assertEquals(2, this.conflater2.getCount());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.LayerEventFixture in project nebula.widgets.nattable by eclipse.
the class NatTableTest method shouldPassOnLayerEventsToListeners.
@Test
public void shouldPassOnLayerEventsToListeners() throws Exception {
LayerListenerFixture listener = new LayerListenerFixture();
this.natTable.addLayerListener(listener);
this.natTable.handleLayerEvent(new LayerEventFixture());
assertTrue(listener.containsInstanceOf(LayerEventFixture.class));
}
Aggregations