被测试类
class ServiceA extend AbstractServiceA {
public void get() {
.....
super.put(SaInput);
....
}
}
父类:
class AbstractServiceA {
public void put(T input) {
.....
....
}
}
测试类
class ServiceATest {
private ServiceA sa = new ServiceA();
public static class Mock {
@MockMethod(targetClass = AbstractServiceA.class, targetMethod="put")
public Object put(SaInput input) {
return obj;
}
}
被测试类 class ServiceA extend AbstractServiceA {
public void get() {
.....
super.put(SaInput);
....
}
}
父类:
class AbstractServiceA {
public void put(T input) {
.....
....
}
}
测试类 class ServiceATest { private ServiceA sa = new ServiceA(); public static class Mock { @MockMethod(targetClass = AbstractServiceA.class, targetMethod="put") public Object put(SaInput input) { return obj; } }
@Test public void test_s() { sa.get(); // 此时调用到sa的get方法里的put方法时,不会进入mock跳过,请问怎么处理?是否支持这样的调用方法? // 使用版本0.6.10 } }