如何模拟不具有getter属性的类?我是JUnit的新手,mockito可以帮助我吗?
public class RegisterDeviceApiBody
{
@SerializedName("Login")
private String mLogin;
@SerializedName("Password")
private String mPassword;
@SerializedName("Nickname")
private String mNickName;
//setter login
public void setLogin(final String login) {
mLogin = login;
}
//setter password
public void setPassword(final String password) {
mPassword = password;
}
//setter nickname
public void setNickName(final String nickName) {
mNickName = nickName;
}
}