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

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture


    private static final String TEST_COLUMN_NAME = "Test column name";

    @Test
    public void shouldRenameColumnHeader() throws Exception {
        NatTable natTableFixture = new NatTableFixture();

        String originalColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals("Column 2", originalColumnHeader);

        natTableFixture.doCommand(new RenameColumnHeaderCommand(
                natTableFixture, 2, TEST_COLUMN_NAME));
        String renamedColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals(TEST_COLUMN_NAME, renamedColumnHeader);
    }
View Full Code Here


        assertEquals(TEST_COLUMN_NAME, renamedColumnHeader);
    }

    @Test
    public void shouldRenameColumnHeaderForReorderedColumn() throws Exception {
        NatTable natTableFixture = new NatTableFixture();

        String originalColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals("Column 2", originalColumnHeader);

        natTableFixture.doCommand(new ColumnReorderCommand(natTableFixture, 1,
                5));

        originalColumnHeader = natTableFixture.getDataValueByPosition(2, 0)
                .toString();
        assertEquals("Column 3", originalColumnHeader);

        natTableFixture.doCommand(new RenameColumnHeaderCommand(
                natTableFixture, 2, TEST_COLUMN_NAME));
        String renamedColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals(TEST_COLUMN_NAME, renamedColumnHeader);

    }
View Full Code Here

    @Test
    public void testGetAvailableStates() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

    @Test
    public void testDeleteState() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

    @Test
    public void testDeleteStateOnNullProperties() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

    @Test
    public void testDeleteStateOnNullState() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

    @Test
    public void testDeleteStateOnEmptyProperties() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

    @Test
    public void testDeleteStateOnEmptyState() {
        Properties properties = new Properties();

        NatTable natTable = new NatTableFixture();
        natTable.saveState("", properties);
        natTable.saveState("Blubb", properties);
        natTable.saveState("Temp", properties);

        Collection<String> stateNames = PersistenceHelper
                .getAvailableStates(properties);
        assertTrue(
                "Resulting state name collection does not contain the empty default state",
View Full Code Here

                        new DefaultDataValidator());
            }

        });

        this.natTable = new NatTableFixture(this.viewportLayer);

        this.natTable.enableEditingOnAllCells();
        this.natTable.getConfigRegistry().registerConfigAttribute(
                EditConfigAttributes.CELL_EDITABLE_RULE,
                IEditableRule.NEVER_EDITABLE, DisplayMode.EDIT, NOT_EDITABLE);
View Full Code Here

        model.addColumnsIndexesToGroup("G4", 8, 9);

        bodyStack = new ColumnGroupBodyLayerStack(new DataLayerFixture(20, 10,
                10, 20), model);

        new NatTableFixture(bodyStack); // Inits client area
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture

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.