fit invoke from test case without testable

This commit is contained in:
金戟 2021-02-17 23:24:14 +08:00
parent 03ec857cd0
commit 14549040d9

View File

@ -29,9 +29,8 @@ public class MockAssociationUtil {
public static boolean isAssociated() {
MockContext mockContext = MockContextUtil.context.get();
if (mockContext == null) {
// skip the association check
LogUtil.warn("Mock association check is invoked without test context");
return true;
// invoked from test case not transformed by testable
return false;
}
String testClassName = mockContext.testClassName;
String mockClassName = Thread.currentThread().getStackTrace()[INDEX_OF_MOCK_CLASS].getClassName();