use of org.eclipse.nebula.widgets.nattable.formula.command.EnableFormulaCachingCommand in project nebula.widgets.nattable by eclipse.
the class FormulaIntegrationTest method testResultCachingDisabled.
@Test
public void testResultCachingDisabled() throws InterruptedException {
this.natTable.doCommand(new DisableFormulaCachingCommand());
assertNotNull(this.natTable.getDataValueByPosition(3, 1));
assertEquals(new BigDecimal("15"), this.natTable.getDataValueByPosition(3, 1));
ILayerEvent receivedEvent = this.listenerFixture.getReceivedEvent(CellVisualChangeEvent.class);
assertNull(receivedEvent);
this.natTable.doCommand(new EnableFormulaCachingCommand());
assertNull(this.natTable.getDataValueByPosition(3, 1));
// wait until calculation is processed
Thread.sleep(50);
assertEquals(new BigDecimal("15"), this.natTable.getDataValueByPosition(3, 1));
receivedEvent = this.listenerFixture.getReceivedEvent(CellVisualChangeEvent.class);
assertNotNull(receivedEvent);
}
Aggregations