/** * Verifies, whether value exists in row.. * * @param row The row of the cell. * @param rowOperator the row header operator * @param value The cell text to verify. * @param operator The operation used to verify * @param searchType Determines where the search begins ("relative" or "absolute") * @param exists true if value exists, false otherwise * @throws StepExecutionException If the row or the column is invalid, or if the rendered text * cannot be extracted. */ public void rcVerifyValueInRow( final String row, final String rowOperator, final String value, final String operator, final String searchType, boolean exists) throws StepExecutionException { final TreeTableOperationContext adapter = getContext(); final int implRow = adapter.getRowFromString(row, rowOperator); boolean valueIsExisting = false; // if row is header if (implRow == -1) { for (int i = getStartingColIndex(searchType); i < adapter.getColumnCount(); ++i) { if (MatchUtil.getInstance().match(adapter.getColumnHeaderText(i), value, operator)) { valueIsExisting = true; break; } } } else { for (int i = getStartingColIndex(searchType); i < adapter.getColumnCount(); ++i) { if (MatchUtil.getInstance().match(getCellText(implRow, i), value, operator)) { valueIsExisting = true; break; } } } Verifier.equals(exists, valueIsExisting); }
/** * Verifies, whether value exists in column. * * @param col The column of the cell. * @param colOperator the column header operator * @param value The cell text to verify. * @param operator The operation used to verify * @param searchType Determines where the search begins ("relative" or "absolute") * @param exists true if value exists, false otherwise * @throws StepExecutionException If the row or the column is invalid, or if the rendered text * cannot be extracted. */ public void rcVerifyValueInColumn( final String col, final String colOperator, final String value, final String operator, final String searchType, boolean exists) throws StepExecutionException { TreeTableOperationContext adapter = getContext(); final int implCol = adapter.getColumnFromString(col, colOperator, true); boolean valueExists = isValueExisting(adapter, implCol, value, operator, searchType); Verifier.equals(exists, valueExists); }
/** * Verifies the editable property of the cell under the mouse. * * @param editable The editable property to verify. */ public void rcVerifyEditableAtMousePosition(boolean editable) { TreeTableCell<?, ?> cell = (TreeTableCell<?, ?>) getNodeAtMousePosition(); Verifier.equals(editable, getContext().isCellEditable(cell)); }
/** * Verifies the editable property of the current selected cell. * * @param editable The editable property to verify. */ public void rcVerifySelectedEditable(boolean editable) { Cell cell = getContext().getSelectedCell(); Verifier.equals(editable, getContext().isCellEditable(cell.getRow(), cell.getCol())); }