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 theclassNamerecord component.intcompareTo(TestFailure other) Compares this object to another object.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureMessagerecord component.Returns the value of thefailureTyperecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thestackTracerecord component.testName()Returns the value of thetestNamerecord component.doubletime()Returns the value of thetimerecord component.final StringtoString()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 newTestFailureobject.- 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:
compareToin 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 thetestNamerecord component.- Returns:
- the value of the
testNamerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
className
Returns the value of theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
failureType
Returns the value of thefailureTyperecord component.- Returns:
- the value of the
failureTyperecord component
-
failureMessage
Returns the value of thefailureMessagerecord component.- Returns:
- the value of the
failureMessagerecord component
-
stackTrace
Returns the value of thestackTracerecord component.- Returns:
- the value of the
stackTracerecord component
-
time
public double time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-