Package org.eclipse.nebula.widgets.nattable.test.fixture.command

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture


    @Test
    public void commandPassedOnToParentIfCannotBeHandled() throws Exception {
        ColumnReorderLayer reorderLayer = new ColumnReorderLayer(
                new DataLayerFixture());
        assertFalse(reorderLayer.doCommand(new LayerCommandFixture()));
    }
View Full Code Here


    @Test
    public void commandPassedOnToParentIfCannotBeHandled() throws Exception {
        RowReorderLayer reorderLayer = new RowReorderLayer(
                new DataLayerFixture());
        assertFalse(reorderLayer.doCommand(new LayerCommandFixture()));
    }
View Full Code Here

        Assert.assertTrue(persistable.stateSaved);
    }

    @Test
    public void commandHandlerRegistration() throws Exception {
        LayerCommandFixture command = new LayerCommandFixture();
        CommandHandlerFixture commandHandler = new CommandHandlerFixture();

        dataLayer.registerCommandHandler(commandHandler);
        dataLayer.doCommand(command);

        assertNotNull(commandHandler.getLastCommandHandled());
        commandHandler.clearLastCommandHandled();

        dataLayer.unregisterCommandHandler(command.getClass());
        dataLayer.doCommand(command);
        assertNull(commandHandler.getLastCommandHandled());
    }
View Full Code Here

        underlyingLayer.registerCommandHandler(new CommandHandlerFixture());
    }

    @Test
    public void shouldHandleGenericLayerCommand() {
        Assert.assertTrue(layer.doCommand(new LayerCommandFixture()));
    }
View Full Code Here

        Assert.assertTrue(layer.doCommand(new LayerCommandFixture()));
    }

    @Test
    public void shouldPropagateToUnderlyingLayer() {
        LayerCommandFixture command = new LayerCommandFixture();
        layer.doCommand(command);
        Assert.assertTrue(command.getTargetLayer() instanceof DataLayerFixture);
    }
View Full Code Here

        columnHeaderDataLayer
                .registerCommandHandler(columnHeaderCommandHandler);
        rowHeaderDataLayer.registerCommandHandler(rowHeaderCommandHandler);
        cornerDataLayer.registerCommandHandler(cornerCommandHandler);

        final ILayerCommand command = new LayerCommandFixture();

        gridLayerUnderTest.doCommand(command);

        Assert.assertTrue(bodyCommandHandler.isCommandCaught());
        Assert.assertFalse(columnHeaderCommandHandler.isCommandCaught());
View Full Code Here

        columnHeaderDataLayer
                .registerCommandHandler(columnHeaderCommandHandler);
        rowHeaderDataLayer.registerCommandHandler(rowHeaderCommandHandler);
        cornerDataLayer.registerCommandHandler(cornerCommandHandler);

        final ILayerCommand command = new LayerCommandFixture();

        gridLayerUnderTest.doCommand(command);

        Assert.assertFalse(bodyCommandHandler.isCommandCaught());
        Assert.assertFalse(columnHeaderCommandHandler.isCommandCaught());
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.