always look for outer mock class

This commit is contained in:
金戟 2021-02-19 17:16:01 +08:00
parent 82d87f3447
commit f660ccb88f

View File

@ -115,9 +115,7 @@ public class TestableClassTransformer implements ClassFileTransformer {
private String foundMockForTestClass(String className) {
ClassNode cn = ClassUtil.getClassNode(className);
if (cn == null) {
return null;
}
if (cn != null) {
String mockClass = lookForMockWithAnnotationAsTestClass(cn);
if (mockClass != null) {
return mockClass;
@ -126,6 +124,7 @@ public class TestableClassTransformer implements ClassFileTransformer {
if (mockClass != null) {
return mockClass;
}
}
return lookForOuterMockClass(className);
}