Package rife.bld.extension.junitreporter
Record Class TestFailure
java.lang.Object
java.lang.Record
rife.bld.extension.junitreporter.TestFailure
- Record Components:
testName
- The name of the test case.displayName
- The display name of the test case.className
- The name of the test class.failureType
- The type of the failure.failureMessage
- The failure message.stackTrace
- The stack trace of the failure.time
- The execution time of the test case.
- All Implemented Interfaces:
Comparable<TestFailure>
public record TestFailure(String testName, String displayName, String className, String failureType, String failureMessage, String stackTrace, double time)
extends Record
implements Comparable<TestFailure>
Represents a failure that occurred during the execution of a specific test case in a test suite.
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassName
record component.int
compareTo
(TestFailure other) Compares this object to another object.Returns the value of thedisplayName
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefailureMessage
record component.Returns the value of thefailureType
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thestackTrace
record component.testName()
Returns the value of thetestName
record component.double
time()
Returns the value of thetime
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TestFailure
public TestFailure(String testName, String displayName, String className, String failureType, String failureMessage, String stackTrace, double time) Constructs a newTestFailure
object.- Parameters:
testName
- The name of the test case.displayName
- The display name of the test case.className
- The name of the test class.failureType
- The type of failure that occurred.failureMessage
- The detailed message describing the failure.stackTrace
- The stack trace of the failure.time
- The execution time of the test case.- Throws:
NullPointerException
- If any of the required parameters are null.IllegalArgumentException
- If the execution time is negative.
-
-
Method Details
-
compareTo
Compares this object to another object.- Specified by:
compareTo
in interfaceComparable<TestFailure>
- Parameters:
other
- the object to compare to- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
testName
Returns the value of thetestName
record component.- Returns:
- the value of the
testName
record component
-
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
className
Returns the value of theclassName
record component.- Returns:
- the value of the
className
record component
-
failureType
Returns the value of thefailureType
record component.- Returns:
- the value of the
failureType
record component
-
failureMessage
Returns the value of thefailureMessage
record component.- Returns:
- the value of the
failureMessage
record component
-
stackTrace
Returns the value of thestackTrace
record component.- Returns:
- the value of the
stackTrace
record component
-
time
public double time()Returns the value of thetime
record component.- Returns:
- the value of the
time
record component
-