Class IssueTestCase

java.lang.Object
org.junitpioneer.jupiter.IssueTestCase

public final class IssueTestCase extends Object
Represents the execution result of test method, which is annotated with Issue.

Once Pioneer baselines against Java 17, this will be a record.

Since:
1.1
See Also:
  • Field Details

    • NO_RESULT_EXCEPTION_MESSAGE

      private static final String NO_RESULT_EXCEPTION_MESSAGE
      See Also:
    • testId

      private final String testId
    • result

      private final org.junit.platform.engine.TestExecutionResult.Status result
    • elapsedTime

      private final Optional<Long> elapsedTime
  • Constructor Details

    • IssueTestCase

      public IssueTestCase(String testId, org.junit.platform.engine.TestExecutionResult.Status result, Optional<Long> elapsedTime)
      Parameters:
      testId - Unique name of the test method
      result - Result of the execution
      elapsedTime - The (optional) duration of test execution
    • IssueTestCase

      public IssueTestCase(String testId, org.junit.platform.engine.TestExecutionResult.Status result)
      Parameters:
      testId - Unique name of the test method
      result - Result of the execution
    • IssueTestCase

      public IssueTestCase(String testId, org.junit.platform.engine.TestExecutionResult.Status result, long elapsedTime)
      Parameters:
      testId - Unique name of the test method
      result - Result of the execution
      elapsedTime - The duration of test execution
  • Method Details

    • testId

      public String testId()
      Returns the unique name of the test method.
      Returns:
      Unique name of the test method
    • result

      public org.junit.platform.engine.TestExecutionResult.Status result()
      Returns the result of the test methods' execution.
      Returns:
      Result of the test methods' execution.
    • elapsedTime

      public Optional<Long> elapsedTime()
      Returns the elapsed time since the start of test methods' execution in milliseconds.
      Returns:
      The elapsed time in ms.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object