mirror of
https://github.com/alibaba/testable-mock.git
synced 2026-08-19 09:43:29 +08:00
doc: update test case name
This commit is contained in:
@@ -27,7 +27,7 @@ At this time, follow a principle that the type of the first parameter of the moc
|
||||
|
||||
Therefore, regardless of whether the actually called method comes from the parent class or the subclass, and whether the subclass overrides the method. If the calling variable is of the parent type (or interface type), the `targetClass` value of `@MockInvoke` annotation (or the first parameter type of the mock method) should use the corresponding parent type / interface type.
|
||||
|
||||
See the use case of the `DemoInheritTest` test class in the Java and Kotlin examples.
|
||||
See the use case of the `DemoReferenceTest` test class in the Java and Kotlin examples.
|
||||
|
||||
#### 5. How to mock generic methods (template methods)?
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
因此,不论实际被调用方法来自父类还是子类,也不论子类是否覆写该方法。若发起调用的变量为父类型(或接口类型),则`@MockInvoke`注解的`targetClass`参数值(或Mock方法的首个参数类型)都应该使用相应的父类/接口类的类型。
|
||||
|
||||
参见Java和Kotlin示例中`DemoInheritTest`测试类的用例。
|
||||
参见Java和Kotlin示例中`DemoReferenceTest`测试类的用例。
|
||||
|
||||
#### 5. 如何Mock对于泛型方法(模板方法)?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user