@Test public void testDelete() { logView = new LogView(); logView.open(); assertFalse("There must be messages", logView.getErrorMessages().isEmpty()); logView.deleteLog(); assertTrue("There should be no messages", logView.getErrorMessages().isEmpty()); logView.restoreLog(); assertTrue("There should be no messages", logView.getErrorMessages().isEmpty()); }
protected void checkErrorLog(Quickstart qstart) { List<LogMessage> allErrors = new ArrayList<LogMessage>(); List<LogMessage> errors = errorLogView.getErrorMessages(); String errorMessages = ""; for (LogMessage message : errors) { if (!message.getMessage().contains("Unable to delete") && !message.getMessage().contains("Could not delete")) { reporter.addError(qstart, "ERROR IN ERROR LOG: " + message.getMessage()); errorMessages += "\t" + message.getMessage() + "\n"; } } errorLogView.deleteLog(); if (!allErrors.isEmpty()) { fail("There are errors in error log:\n" + errorMessages); } }
protected static void setupLog() { errorLogView = new LogView(); errorLogView.open(); errorLogView.deleteLog(); }