public class MockAssociationUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INDEX_OF_MOCK_CLASS
[0]Thread → [1]MockAssociationUtil → [2]MockClass
|
static Map<String,Set<String>> |
mockToTests
Mock class referred by @MockWith annotation to list of its test classes
MockClassName (dot-separated) → Set of associated [TestClassNames (dot-separated)]
|
| Constructor and Description |
|---|
MockAssociationUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
invokeOrigin(Class<?> originClass,
String originMethod,
Object... args)
Note: this method will be invoked in transformed byte code
Invoke original method when mock class is not associated with current test case
|
static boolean |
isAssociated()
Note: this method will be invoked in transformed byte code
Check whether current mock method is invoked from its associated test class
should be invoked in mock method
|
public static final int INDEX_OF_MOCK_CLASS
Copyright © 2021. All rights reserved.