AbstractScesimGridModel extends BaseGridData { public void selectColumn(int columnIndex) { if (columnIndex > getColumnCount() - 1 || columnIndex < 0) { throw new IllegalArgumentException("Wrong column index: " + columnIndex); } selectedColumn = getColumns().get(columnIndex); } AbstractScesimGridModel();  AbstractScesimGridModel(boolean isMerged); abstract GridWidget getGridWidget(); void bindContent(T abstractScesimModel); void setEventBus(EventBus eventBus); int nextColumnCount(); Map.Entry<String, String> getValidPlaceholders(); CollectionEditorSingletonDOMElementFactory getCollectionEditorSingletonDOMElementFactory(); void setCollectionEditorSingletonDOMElementFactory(CollectionEditorSingletonDOMElementFactory collectionEditorSingletonDOMElementFactory); ScenarioCellTextAreaSingletonDOMElementFactory getScenarioCellTextAreaSingletonDOMElementFactory(); void setScenarioCellTextAreaSingletonDOMElementFactory(ScenarioCellTextAreaSingletonDOMElementFactory scenarioCellTextAreaSingletonDOMElementFactory); ScenarioHeaderTextBoxSingletonDOMElementFactory getScenarioHeaderTextBoxSingletonDOMElementFactory(); void setScenarioHeaderTextBoxSingletonDOMElementFactory(ScenarioHeaderTextBoxSingletonDOMElementFactory scenarioHeaderTextBoxSingletonDOMElementFactory); ScenarioExpressionCellTextAreaSingletonDOMElementFactory getScenarioExpressionCellTextAreaSingletonDOMElementFactory(); void setScenarioExpressionCellTextAreaSingletonDOMElementFactory(ScenarioExpressionCellTextAreaSingletonDOMElementFactory scenarioExpressionCellTextAreaSingletonDOMElementFactory); void destroyAllTextAreaDOMElementFactoryResources(); @Override void appendRow(GridRow row); abstract void insertRowGridOnly(final int rowIndex,
                                           final GridRow row,
                                           final E abstractScesimData); void insertRowGridOnly(final int rowIndex, final GridRow row); @Override void insertRow(int rowIndex, GridRow row); @Override Range deleteRow(int rowIndex); void duplicateRow(int rowIndex, GridRow row); void duplicateColumnValues(int originalColumnIndex, int newColumnIndex); void insertColumnGridOnly(final int index, final GridColumn<?> column); @Override void insertColumn(final int index, final GridColumn<?> column); void deleteColumn(int columnIndex); void deleteInstance(int columnIndex); void updateColumnInstance(int columnIndex, final GridColumn<?> column); void updateColumnProperty(int columnIndex, final GridColumn<?> column, List<String> propertyNameElements, String lastLevelClassName, boolean keepData, FactMappingValueType valueType); Range setCellGridOnly(int rowIndex, int columnIndex, Supplier<GridCell<?>> cellSupplier); @Override Range setCell(int rowIndex, int columnIndex, Supplier<GridCell<?>> cellSupplier); @Override Range setCellValue(int rowIndex, int columnIndex, GridCellValue<?> value); @Override Range deleteCell(int rowIndex, int columnIndex); abstract Range getInstanceLimits(int columnIndex); List<ScenarioGridColumn> getInstanceScenarioGridColumns(int columnIndex); List<ScenarioGridColumn> getInstanceScenarioGridColumns(ScenarioGridColumn selectedColumn); int getFirstIndexLeftOfGroup(String groupName); int getFirstIndexRightOfGroup(String groupName); long getGroupSize(String groupName); int getInstancesCount(String className); void updateHeader(int columnIndex, int headerRowIndex, String headerCellValue); void clear(); @Override void clearSelections(); boolean forceRefreshWidth(); void synchronizeFactMappingsWidths(); void synchronizeFactMappingWidth(final GridColumn<?> column); void loadFactMappingsWidth(); void selectColumn(int columnIndex); void selectRow(int rowIndex); GridColumn<?> getSelectedColumn(); Optional<T> getAbstractScesimModel(); boolean isSelectedColumnEmpty(); boolean isColumnEmpty(int columnIndex); boolean isAlreadyAssignedProperty(List<String> propertyNameElements); void checkAlreadyAssignedProperty(int columnIndex, List<String> propertyNameElements); boolean isSameSelectedColumnProperty(List<String> propertyNameElements); boolean isSameSelectedColumnProperty(int columnIndex, List<String> propertyNameElements); boolean isSameSelectedColumnType(String className); boolean isSameSelectedColumnType(int columnIndex, String className); boolean isSameInstanceType(String className); void checkSameInstanceHeader(int columnIndex, String headerName); boolean isSameInstanceType(int columnIndex, String headerName); void checkSamePropertyHeader(int columnIndex, List<String> propertyNameElements); void resetErrors(); void resetErrors(int rowIndex); void resetError(int rowIndex, int columnIndex); void refreshErrors(); void setSimpleJavaTypeInstancesName(Set<String> simpleJavaTypeInstancesName); void validateInstanceHeaderUpdate(String instanceHeaderCellValue, int columnIndex, boolean isADataType); void validatePropertyHeaderUpdate(String propertyHeaderCellValue, int columnIndex, boolean isPropertyType); boolean isSimpleType(String factClassName); BaseSingletonDOMElementFactory getDOMElementFactory(String className,
                                                               ScenarioSimulationModel.Type modelType,
                                                               FactMappingValueType valueType); static final int HEADER_ROW_COUNT; }
@Test(expected = IllegalArgumentException.class) public void setSelectedColumn_NegativeIndex() { int columnIndex = -1; abstractScesimGridModelSpy.selectColumn(columnIndex); }
@Test(expected = IllegalArgumentException.class) public void setSelectedColumn_OverflowIndex() { int columnIndex = 7; abstractScesimGridModelSpy.selectColumn(columnIndex); }