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 Details

    • TestFailure

      public TestFailure(String testName, String displayName, String className, String failureType, String failureMessage, String stackTrace, double time)
      Constructs a new TestFailure 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

      public int compareTo(TestFailure other)
      Compares this object to another object.
      Specified by:
      compareTo in interface Comparable<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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • testName

      public String testName()
      Returns the value of the testName record component.
      Returns:
      the value of the testName record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • failureType

      public String failureType()
      Returns the value of the failureType record component.
      Returns:
      the value of the failureType record component
    • failureMessage

      public String failureMessage()
      Returns the value of the failureMessage record component.
      Returns:
      the value of the failureMessage record component
    • stackTrace

      public String stackTrace()
      Returns the value of the stackTrace record component.
      Returns:
      the value of the stackTrace record component
    • time

      public double time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component