print count of mock method found

This commit is contained in:
金戟 2020-11-17 13:09:34 +08:00
parent 40a1a999a7
commit 7e77f77fa2
2 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,8 @@ public class SourceClassHandler extends BaseClassHandler {
private void transformMethod(ClassNode cn, MethodNode mn, Set<MethodInfo> memberInjectMethods,
Set<MethodInfo> newOperatorInjectMethods) {
LogUtil.debug(" Received %d member mock methods, %d constructor mock methods",
memberInjectMethods.size(), newOperatorInjectMethods.size());
AbstractInsnNode[] instructions = mn.instructions.toArray();
List<MethodInfo> memberInjectMethodList = new ArrayList<MethodInfo>(memberInjectMethods);
int i = 0;

View File

@ -79,6 +79,7 @@ public class TestableClassTransformer implements ClassFileTransformer {
for (MethodNode mn : cn.methods) {
checkMethodAnnotation(cn, methodInfos, mn);
}
LogUtil.debug(" Found %d mock methods", methodInfos.size());
return methodInfos;
} catch (Exception e) {
return new ArrayList<MethodInfo>();