Class OpenMock.MockBuilder<T>
java.lang.Object
cloud.opencode.base.test.OpenMock.MockBuilder<T>
- Type Parameters:
T- the mock type | mock类型
- Enclosing class:
OpenMock
Mock Builder for fluent mock configuration
用于流畅mock配置的Mock构建器
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the mock 构建模拟thenReturn(String methodName, Object returnValue) Stubs method to return value 桩方法返回值thenReturn(String methodName, Object[] args, Object returnValue) Stubs method with specific args to return value 桩特定参数的方法返回值
-
Method Details
-
thenReturn
Stubs method to return value 桩方法返回值- Parameters:
methodName- the method name | 方法名returnValue- the return value | 返回值- Returns:
- this builder | 此构建器
-
thenReturn
Stubs method with specific args to return value 桩特定参数的方法返回值- Parameters:
methodName- the method name | 方法名args- the arguments | 参数returnValue- the return value | 返回值- Returns:
- this builder | 此构建器
-
build
-