You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i hava a method inputTxt(ParamType param) in Father class ,and i invoke inputTxt in Child class, i want to test Child class and i want to mock inputTxt method. How can i do ,i have tried many plan but not get expected value.
like :
Method inputEnTxt = PowerMockito.method(Father.class, "inputTxt", ParamaType.class);
PowerMockito.replace(inputTxt).with(new InvocationHandler() { @OverRide
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return true;
}
});
it's still to call real method inputTxt.
The text was updated successfully, but these errors were encountered:
Hey,
i hava a method inputTxt(ParamType param) in Father class ,and i invoke inputTxt in Child class, i want to test Child class and i want to mock inputTxt method. How can i do ,i have tried many plan but not get expected value.
like :
Method inputEnTxt = PowerMockito.method(Father.class, "inputTxt", ParamaType.class);
PowerMockito.replace(inputTxt).with(new InvocationHandler() {
@OverRide
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return true;
}
});
it's still to call real method inputTxt.
The text was updated successfully, but these errors were encountered: