Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么mock方法里调用的对象的equals方法? #23

Open
ch-chenhuan opened this issue Aug 6, 2019 · 1 comment
Open

怎么mock方法里调用的对象的equals方法? #23

ch-chenhuan opened this issue Aug 6, 2019 · 1 comment

Comments

@ch-chenhuan
Copy link

jmockit中mock方法中的更新操作时,方法里的对象时new出来的,我用Expectations来Mock类及更新操作,运行失败。怀疑是mock的对象和方法中new出的对象比较返回了false,请问有谁mock过方法里调用的对象的equals方法?

@hzdavid
Copy link
Owner

hzdavid commented Aug 23, 2019

java.lang.Object是不可以Mock的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants