Search in sources :

Example 1 with CommandHandlerFixture

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

the class AbstractLayerTest method commandHandlerRegistration.

@Test
public void commandHandlerRegistration() throws Exception {
    LayerCommandFixture command = new LayerCommandFixture();
    CommandHandlerFixture commandHandler = new CommandHandlerFixture();
    this.dataLayer.registerCommandHandler(commandHandler);
    this.dataLayer.doCommand(command);
    assertNotNull(commandHandler.getLastCommandHandled());
    commandHandler.clearLastCommandHandled();
    this.dataLayer.unregisterCommandHandler(command.getClass());
    this.dataLayer.doCommand(command);
    assertNull(commandHandler.getLastCommandHandled());
}
Also used : LayerCommandFixture(org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture) CommandHandlerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.command.CommandHandlerFixture) Test(org.junit.Test)

Aggregations

CommandHandlerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.command.CommandHandlerFixture)1 LayerCommandFixture (org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture)1 Test (org.junit.Test)1