EasyMock:重播后再增加一个期望 [英] EasyMock: Add one more expectation after replay

查看:80
本文介绍了EasyMock:重播后再增加一个期望的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重播模拟对象后是否可以增加期望?

Is it possible to add expectation after having mock object replayed?

推荐答案

可以在重新播放模拟对象之前对其进行重置并对其应用新的期望.

It is possible to reset a mock object and apply new expectations to it before replaying it again.

EasyMock.reset(myMock)

有关更多信息,请参见 EasyMock文档.

See the EasyMock documentation for more information.

这篇关于EasyMock:重播后再增加一个期望的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆