@Retention(value=RUNTIME) @Target(value={FIELD,METHOD,ANNOTATION_TYPE,PARAMETER}) public static @interface Mock.Inject
用来修饰属性,注入上下文中的模拟器
重名的模拟器优先级上:
在集合、数组的属性模拟上,上下文中同名的序列模拟器优先级高于其他单值模拟器
多个相同类型(单值并且与当前需要模拟的类型匹配的、序列)模拟器,就近原则,越靠近将要模拟的属性则越优先
| Modifier and Type | Required Element and Description |
|---|---|
String |
value |
| Modifier and Type | Optional Element and Description |
|---|---|
Mock.NotFound |
notFound |
public abstract String value
public abstract Mock.NotFound notFound
Copyright © 2020. All rights reserved.