我在DummyClass类中有以下方法:
protected Response prepareResponse(String Id, BigInteger version, String Reason, boolean isSuccessful,
String errorCode, String errorMessage)
在方法内部,我将参数的所有参数设置为Response并返回它。但我想知道如何使用Jmockit模拟该方法。
到目前为止,我使用了以下方法:
new MockUp<DummyClass>() {
@Mock protected Response prepareResponse(String Id, BigInteger version, String Reason, boolean isSuccessful,
String errorCode, String errorMessage){
// I am not sure what to return here. I have to set the fields and return the response object. But I am not sure how to do it.
}
};
我被困在这里。请告诉我。
谢谢, Gautham