Class ErrorTracker

java.lang.Object
com.qaitsolutions.pframe.core.assertion.ErrorTracker

public final class ErrorTracker extends Object
Entity tracks errors from assertions and stores them.

Since:
1.0
Author:
Iulian Andrei (iulian.andrei@qaitsolutions.com)
  • Constructor Details

    • ErrorTracker

      public ErrorTracker()
  • Method Details

    • addError

      public void addError(String message, Throwable e)
      Inserts error to tracker.
      Parameters:
      message - Description of error.
      e - Actual thrown error.
    • addError

      public void addError(String message)
      Inserts error to tracker.

      Parameters:
      message - Description of error.
    • addError

      public void addError(Throwable e)
      Inserts error to tracker.

      Parameters:
      e - Actual thrown error.
    • getErrorsAsString

      public String getErrorsAsString()
      Retrieves all errors and returns them as a String.

      Returns:
      String containing all errors.
    • containsErrors

      public boolean containsErrors()
      Checks if errors are present in Tracker.

      Returns:
      True if tracker contains errors, False if tracker doesn't contain errors.
    • clear

      public void clear()
      Removes all stored errors.