public void testUniqueValue(SheetValidation sheetValidation) { String colC = "Column C"; ColumnValidation validateColC = sheetValidation.createColumnValidation(colC); boolean check = validateColC.uniqueValue(); if (!check) { StringBuffer errorToPrint = sheetValidation .getErrorManager() .createDupFoundMessage( ErrorManager.UNIQUENESS_ERROR, validateColC.getMultipleErrorsFound(), ","); System.out.println(errorToPrint); sheetValidation.getErrorManager().printMessage(errorToPrint.toString()); } }
public void testDropDown(SheetValidation sheetValidation) { String colB = "Column B"; String colDD = "Drop Down"; ColumnValidation validation = sheetValidation.createColumnValidation(colB, colDD); boolean check = validation.dropDown(); if (!check) { // StringBuffer errorToPrint = sheetValidation.getErrorManager() // .createDropDownMessage(ErrorManager.DROP_DOWN_ERROR, // validation.getMultipleErrorsFound()); StringBuffer errorToPrint2 = sheetValidation .getErrorManager() .createMessageFromErrorMessage( ErrorManager.DROP_DOWN_ERROR, new Object[] {validation.getMultipleErrorsFound()}); System.out.println(errorToPrint2); // sheetValidation.getErrorManager().printMessage(errorToPrint.toString()); } }