Record Class AdapterTckResult
java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterTckResult
- Record Components:
scenarioId- scenario identifierpassed- whether the scenario passedunsupported- whether the adapter explicitly reported unsupported behaviorreasonCode- stable reason codelevel- result compatibility levelsafeMetadata- redacted result metadata
public record AdapterTckResult(String scenarioId, boolean passed, boolean unsupported, String reasonCode, AdapterCompatibilityLevel level, Map<String,String> safeMetadata)
extends Record
Result returned by an adapter probe for one TCK scenario.
The record is immutable and thread-safe. Results must contain stable reason codes and redacted metadata. Required unsupported scenarios are not treated as success by the TCK runner.
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterTckResult(String scenarioId, boolean passed, boolean unsupported, String reasonCode, AdapterCompatibilityLevel level, Map<String, String> safeMetadata) Creates a TCK scenario result. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static AdapterTckResultfailed(AdapterTckScenario scenario, String reasonCode) Creates a failed scenario result.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.booleanpassed()Returns the value of thepassedrecord component.static AdapterTckResultpassed(AdapterTckScenario scenario) Creates a passed scenario result.Returns the value of thereasonCoderecord component.Returns the value of thesafeMetadatarecord component.Returns the value of thescenarioIdrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunsupportedrecord component.static AdapterTckResultunsupported(AdapterTckScenario scenario, String reasonCode) Creates an unsupported scenario result.
-
Constructor Details
-
AdapterTckResult
-
-
Method Details
-
passed
Creates a passed scenario result.- Parameters:
scenario- scenario that passed- Returns:
- passed result
-
unsupported
Creates an unsupported scenario result.- Parameters:
scenario- scenario that is unsupportedreasonCode- stable reason code- Returns:
- unsupported result
-
failed
Creates a failed scenario result.- Parameters:
scenario- scenario that failedreasonCode- stable reason code- Returns:
- failed result
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
scenarioId
Returns the value of thescenarioIdrecord component.- Returns:
- the value of the
scenarioIdrecord component
-
passed
-
unsupported
public boolean unsupported()Returns the value of theunsupportedrecord component.- Returns:
- the value of the
unsupportedrecord component
-
reasonCode
Returns the value of thereasonCoderecord component.- Returns:
- the value of the
reasonCoderecord component
-
level
-
safeMetadata
Returns the value of thesafeMetadatarecord component.- Returns:
- the value of the
safeMetadatarecord component
-