Record Class TestScriptDisplay
java.lang.Object
java.lang.Record
org.fhirfrog.frog.testscriptrender.TestScriptDisplay
- Record Components:
title- the TestScript'stitle, falling back tonameif absentname- the TestScript'snameurl- the TestScript's canonicalurlversion- the TestScript'sversion, ornullif absentstatus- the TestScript'sstatuscode (e.g.active), ornullif absentdescription- the TestScript'sdescriptionnarrative, ornullif absentfixtures- the fixtures declared on the TestScript, in declaration ordervariables- the variables declared on the TestScript, in declaration orderphases- setup (if present), then one phase per test, then teardown (if present) - in that order
public record TestScriptDisplay(String title, String name, String url, String version, String status, String description, List<TestScriptDisplay.FixtureDisplay> fixtures, List<TestScriptDisplay.VariableDisplay> variables, List<TestScriptDisplay.PhaseDisplay> phases)
extends Record
A display-only, human-readable rendering of a FHIR
TestScript definition.
This is not a re-parseable serialization (contrast with TSH,
fhir-frog-shorthand's authoring DSL) - it exists purely to be rendered for reading, e.g. to
HTML via TestScriptHtmlRenderer. There is no obligation, and no attempt, to preserve
enough information to reconstruct the original TestScript resource from this tree.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA singleTestScript.fixtureentry.static final recordOne phase of test execution:setup, a singletestentry, orteardown.static enumWhich part of the TestScript aTestScriptDisplay.PhaseDisplaycorresponds to.static enumWhether/how a failingTestScriptDisplay.StepDisplaygates the phase's pass/fail outcome.static final recordA single step within a phase: oneoperationor oneassert.static enumWhether aTestScriptDisplay.StepDisplayis an operation (a wire call) or an assert (a check on the last response).static final recordA singleTestScript.variableentry. -
Constructor Summary
ConstructorsConstructorDescriptionTestScriptDisplay(String title, String name, String url, String version, String status, String description, List<TestScriptDisplay.FixtureDisplay> fixtures, List<TestScriptDisplay.VariableDisplay> variables, List<TestScriptDisplay.PhaseDisplay> phases) Creates an instance of aTestScriptDisplayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.fixtures()Returns the value of thefixturesrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.phases()Returns the value of thephasesrecord component.status()Returns the value of thestatusrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.Returns the value of thevariablesrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
TestScriptDisplay
public TestScriptDisplay(String title, String name, String url, String version, String status, String description, List<TestScriptDisplay.FixtureDisplay> fixtures, List<TestScriptDisplay.VariableDisplay> variables, List<TestScriptDisplay.PhaseDisplay> phases) Creates an instance of aTestScriptDisplayrecord class.- Parameters:
title- the value for thetitlerecord componentname- the value for thenamerecord componenturl- the value for theurlrecord componentversion- the value for theversionrecord componentstatus- the value for thestatusrecord componentdescription- the value for thedescriptionrecord componentfixtures- the value for thefixturesrecord componentvariables- the value for thevariablesrecord componentphases- the value for thephasesrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
fixtures
Returns the value of thefixturesrecord component.- Returns:
- the value of the
fixturesrecord component
-
variables
Returns the value of thevariablesrecord component.- Returns:
- the value of the
variablesrecord component
-
phases
Returns the value of thephasesrecord component.- Returns:
- the value of the
phasesrecord component
-