Search in sources :

Example 1 with AnyCommandHandlerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.command.AnyCommandHandlerFixture in project nebula.widgets.nattable by eclipse.

the class NatTableTest method shouldFireDisposeCommandOnDisposal.

@Test
public void shouldFireDisposeCommandOnDisposal() throws Exception {
    AnyCommandHandlerFixture commandHandler = new AnyCommandHandlerFixture();
    this.underlyingLayerFixture.registerCommandHandler(commandHandler);
    this.natTable.dispose();
    assertEquals(1, commandHandler.getNumberOfCommandsHandled());
    assertTrue(commandHandler.getCommadHandled() instanceof DisposeResourcesCommand);
}
Also used : AnyCommandHandlerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.command.AnyCommandHandlerFixture) DisposeResourcesCommand(org.eclipse.nebula.widgets.nattable.command.DisposeResourcesCommand) Test(org.junit.Test)

Aggregations

DisposeResourcesCommand (org.eclipse.nebula.widgets.nattable.command.DisposeResourcesCommand)1 AnyCommandHandlerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.command.AnyCommandHandlerFixture)1 Test (org.junit.Test)1