public void testUniqueHeader(SheetValidation sheetValidation) { RowValidation validateHeader = sheetValidation.createRowValidation(0); boolean check = validateHeader.uniqueHeader(); if (!check) { StringBuffer errorToPrint = sheetValidation .getErrorManager() .createDupFoundMessage( ErrorManager.UNIQUENESS_ERROR, validateHeader.getMultipleErrorsFound(), ","); System.out.println(errorToPrint); sheetValidation.getErrorManager().printMessage(errorToPrint.toString()); } }
public void testMandatoryCells(SheetValidation sheetValidation) { RowValidation validateRowB = sheetValidation.createRowValidation(9); boolean check = true; ErrorManager errorManager = sheetValidation.getErrorManager(); try { check = validateRowB.mandatoryCells("Column C"); if (!check) { StringBuffer errorToPrint = errorManager.createMessage( ErrorManager.EMPTY_CELL_ERROR, validateRowB.getErrorsFound()); System.out.print(errorToPrint); errorManager.printMessage(errorToPrint.toString()); } } catch (MissingColumnException e) { StringBuffer errorToPrint = errorManager.createMissingColumnMessage( ErrorManager.MISSING_COL_ERROR, validateRowB.getErrorsFound()); System.out.println(errorToPrint); errorManager.printMessage(errorToPrint.toString()); } }