Enum Class TestErrorCode
- All Implemented Interfaces:
Serializable, Comparable<TestErrorCode>, Constable
Test Error Code
测试错误码
Error codes for test operations (TEST-1xxx ~ 4xxx).
测试操作的错误码(TEST-1xxx ~ 4xxx)。
Features | 主要功能:
- Categorized test error codes - 分类测试错误码
- Assertion, setup, execution error codes - 断言、设置、执行错误码
Usage Examples | 使用示例:
TestErrorCode code = TestErrorCode.ASSERTION_FAILED;
System.out.println(code.code() + ": " + code.message());
Security | 安全性:
- Thread-safe: Yes (immutable) - 线程安全: 是(不可变)
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptioncode()Get error code 获取错误码message()Get error message 获取错误消息toString()static TestErrorCodeReturns the enum constant of this class with the specified name.static TestErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASSERTION_FAILED
-
EXPECTED_EXCEPTION_NOT_THROWN
-
UNEXPECTED_EXCEPTION
-
VALUE_MISMATCH
-
ASSERTION_NULL
-
ASSERTION_EQUALS
-
ASSERTION_TIMEOUT
-
FIXTURE_NOT_FOUND
-
FIXTURE_INIT_FAILED
-
MOCK_SETUP_FAILED
-
MOCK_CREATION_FAILED
-
MOCK_NOT_INTERFACE
-
MOCK_VERIFICATION_FAILED
-
TIMEOUT
-
CONCURRENT_ERROR
-
BENCHMARK_FAILED
-
BENCHMARK_TIMEOUT
-
DATA_GENERATION_FAILED
-
DATA_RANGE_INVALID
-
GENERAL_ERROR
-
INVALID_CONFIGURATION
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
-
message
-
toString
- Overrides:
toStringin classEnum<TestErrorCode>
-