public void shouldReturnFullySelectedStyle() {
// Select full column
gridLayer.doCommand(new ViewportSelectRowCommand(gridLayer, 1, false,
false));
RowHeaderLayer rowHeaderLayer = (RowHeaderLayer) gridLayer
.getChildLayerByLayoutCoordinate(0, 1);
// Since I selected using grid coordinates, the column position should
// be 1 rather than 2
int rowPosition = gridLayer.localToUnderlyingRowPosition(1);
final LabelStack labelStack = rowHeaderLayer.getConfigLabelsByPosition(
rowPosition, 0);
Assert.assertTrue(labelStack
.hasLabel(SelectionStyleLabels.ROW_FULLY_SELECTED_STYLE));
rowPosition = gridLayer.localToUnderlyingRowPosition(4);
Assert.assertFalse("Should not have returned fully selected style.",
SelectionStyleLabels.ROW_FULLY_SELECTED_STYLE
.equals(rowHeaderLayer.getConfigLabelsByPosition(0,
rowPosition)));
}