Exemplo n.º 1
0
 @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());
 }
Exemplo n.º 2
0
 @Test
 public void testClearAndRestore() {
   logView = new LogView();
   logView.open();
   assertFalse("There must be messages", logView.getErrorMessages().isEmpty());
   logView.clearLog();
   assertFalse("There should be messages", logView.getErrorMessages().isEmpty());
   logView.restoreLog();
   assertFalse("There should be messages", logView.getErrorMessages().isEmpty());
 }
Exemplo n.º 3
0
  @Test
  public void getErrorMessage() {
    logView = new LogView();
    logView.open();
    List<LogMessage> messages = logView.getErrorMessages();
    assertTrue("No ERROR messages found!", !messages.isEmpty());

    // test ERROR Message no.1
    assertTrue(
        messageIsAvailable(messages, IStatus.ERROR, ERROR_ID_1, ERROR_MESSAGE_1, ERROR_STACK_1));

    // test ERROR Message no.2
    assertTrue(
        messageIsAvailable(messages, IStatus.ERROR, ERROR_ID_2, ERROR_MESSAGE_2, ERROR_STACK_2));
  }
 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);
   }
 }