Record Class TestReportRow

java.lang.Object
java.lang.Record
org.fhirfrog.frog.rendering.TestReportRow
Record Components:
testScriptName - the containing TestReport's own name - a report-level renderer walking several reports uses this to know which script a row belongs to
phase - "Setup", "Teardown", or the named test case (TestReport.test[].name) a row came from
kind - "operation" or "assert" - which half of a SetupActionComponent/TestActionComponent this is
detail - the operation's or assertion's own detail field (often the most specific human-readable identifier FHIR gives an individual step), null if not set
result - TestReportActionResult's code (e.g. "pass", "fail", "skip"), never null
message - the operation's or assertion's own message, null if not set

public record TestReportRow(String testScriptName, String phase, String kind, String detail, String result, String message) extends Record
One operation or assertion within a TestReport, flattened for the row/table-based renderers (Excel, CSV, Markdown, JUnit XML) - each of those needs the same shape, just encoded differently, so the TestReport-walking logic lives once in TestReportRowExtractor rather than being repeated per format.
  • Constructor Details

    • TestReportRow

      public TestReportRow(String testScriptName, String phase, String kind, String detail, String result, String message)
      Creates an instance of a TestReportRow record class.
      Parameters:
      testScriptName - the value for the testScriptName record component
      phase - the value for the phase record component
      kind - the value for the kind record component
      detail - the value for the detail record component
      result - the value for the result record component
      message - the value for the message record component
  • Method Details

    • isPass

      public boolean isPass()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • testScriptName

      public String testScriptName()
      Returns the value of the testScriptName record component.
      Returns:
      the value of the testScriptName record component
    • phase

      public String phase()
      Returns the value of the phase record component.
      Returns:
      the value of the phase record component
    • kind

      public String kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • detail

      public String detail()
      Returns the value of the detail record component.
      Returns:
      the value of the detail record component
    • result

      public String result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component