mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-01-10 20:30:11 +08:00
fit invoke from test case without testable
This commit is contained in:
parent
03ec857cd0
commit
14549040d9
@ -29,9 +29,8 @@ public class MockAssociationUtil {
|
|||||||
public static boolean isAssociated() {
|
public static boolean isAssociated() {
|
||||||
MockContext mockContext = MockContextUtil.context.get();
|
MockContext mockContext = MockContextUtil.context.get();
|
||||||
if (mockContext == null) {
|
if (mockContext == null) {
|
||||||
// skip the association check
|
// invoked from test case not transformed by testable
|
||||||
LogUtil.warn("Mock association check is invoked without test context");
|
return false;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
String testClassName = mockContext.testClassName;
|
String testClassName = mockContext.testClassName;
|
||||||
String mockClassName = Thread.currentThread().getStackTrace()[INDEX_OF_MOCK_CLASS].getClassName();
|
String mockClassName = Thread.currentThread().getStackTrace()[INDEX_OF_MOCK_CLASS].getClassName();
|
||||||
|
Loading…
Reference in New Issue
Block a user