Record Class AssertionResult.Failure
java.lang.Object
java.lang.Record
cloud.opencode.base.test.assertion.AssertionResult.Failure
- Record Components:
message- the failure message | 失败消息expected- the expected value | 期望值actual- the actual value | 实际值
- All Implemented Interfaces:
AssertionResult
- Enclosing interface:
AssertionResult
public static record AssertionResult.Failure(String message, Object expected, Object actual)
extends Record
implements AssertionResult
Failure assertion result.
失败断言结果。
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface AssertionResult
AssertionResult.Failure, AssertionResult.Success -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactual()Returns the value of theactualrecord component.final booleanIndicates whether some other object is "equal to" this one.expected()Returns the value of theexpectedrecord component.final inthashCode()Returns a hash code value for this object.booleanWhether this failure has expected/actual values.message()Returns the value of themessagerecord component.booleanpassed()Whether the assertion passed.toString()Returns a string representation of this record class.
-
Constructor Details
-
Failure
-
-
Method Details
-
passed
public boolean passed()Description copied from interface:AssertionResultWhether the assertion passed. 断言是否通过。- Specified by:
passedin interfaceAssertionResult- Returns:
- true if passed | 如果通过返回 true
-
hasValues
public boolean hasValues()Whether this failure has expected/actual values. 此失败是否有期望值/实际值。- Returns:
- true if has values | 如果有值返回 true
-
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). -
message
-
expected
-
actual
-