- java.lang.Object
-
- org.junitpioneer.jupiter.IssueTestCase
-
public final class IssueTestCase extends java.lang.ObjectRepresents the execution result of test method, which is annotated withIssue.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>elapsedTimeprivate static java.lang.StringNO_RESULT_EXCEPTION_MESSAGEprivate org.junit.platform.engine.TestExecutionResult.Statusresultprivate java.lang.StringtestId
-
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.booleanequals(java.lang.Object o)inthashCode()org.junit.platform.engine.TestExecutionResult.Statusresult()Returns the result of the test methods' execution.java.lang.StringtestId()Returns the unique name of the test method.java.lang.StringtoString()
-
-
-
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 methodresult- Result of the executionelapsedTime- 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 methodresult- 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 methodresult- Result of the executionelapsedTime- 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-