Class IssueTestCase


  • public final class IssueTestCase
    extends java.lang.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:
    Issue, IssueProcessor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Optional<java.lang.Long> elapsedTime  
      private static java.lang.String NO_RESULT_EXCEPTION_MESSAGE  
      private org.junit.platform.engine.TestExecutionResult.Status result  
      private java.lang.String testId  
    • Constructor Summary

      Constructors 
      Constructor Description
      IssueTestCase​(java.lang.String testId, org.junit.platform.engine.TestExecutionResult.Status result)  
      IssueTestCase​(java.lang.String testId, org.junit.platform.engine.TestExecutionResult.Status result, long elapsedTime)  
      IssueTestCase​(java.lang.String testId, org.junit.platform.engine.TestExecutionResult.Status result, java.util.Optional<java.lang.Long> elapsedTime)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.Long> elapsedTime()
      Returns the elapsed time since the start of test methods' execution in milliseconds.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      org.junit.platform.engine.TestExecutionResult.Status result()
      Returns the result of the test methods' execution.
      java.lang.String testId()
      Returns the unique name of the test method.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • NO_RESULT_EXCEPTION_MESSAGE

        private static final java.lang.String NO_RESULT_EXCEPTION_MESSAGE
        See Also:
        Constant Field Values
      • testId

        private final java.lang.String testId
      • result

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

        private final java.util.Optional<java.lang.Long> elapsedTime
    • Constructor Detail

      • IssueTestCase

        public IssueTestCase​(java.lang.String testId,
                             org.junit.platform.engine.TestExecutionResult.Status result,
                             java.util.Optional<java.lang.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​(java.lang.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​(java.lang.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 Detail

      • testId

        public java.lang.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 java.util.Optional<java.lang.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object