Record Class TestReport.TestResult
java.lang.Object
java.lang.Record
cloud.opencode.base.test.report.TestReport.TestResult
- Record Components:
testName- the test name | 测试名称status- the status | 状态duration- the duration | 时长error- the error (if failed) | 错误(如果失败)message- the message | 消息
- Enclosing class:
TestReport
public static record TestReport.TestResult(String testName, TestReport.TestStatus status, Duration duration, Throwable error, String message)
extends Record
Test result
测试结果
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionTestResult(String testName, TestReport.TestStatus status, Duration duration, Throwable error, String message) Creates an instance of aTestResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.longfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static TestReport.TestResultfinal inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.name()booleanpassed()static TestReport.TestResultstatic TestReport.TestResultstatus()Returns the value of thestatusrecord component.testName()Returns the value of thetestNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TestResult
public TestResult(String testName, TestReport.TestStatus status, Duration duration, Throwable error, String message) Creates an instance of aTestResultrecord class.
-
-
Method Details
-
passed
-
failed
-
skipped
-
name
-
passed
public boolean passed() -
durationMs
public long durationMs() -
errorMessage
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
testName
-
status
-
duration
-
error
-
message
-