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);
}