EasyMock: missing behavior definition for the preceeding method call
来源:互联网 发布:java入门编程实例 编辑:程序博客网 时间:2024/04/30 23:30
If a method of a class which will be mocked by EasyMock did return some value, you should specify the return value explicitly before you use the mock object in your unit test case. Or else EasyMock will complain:
java.lang.IllegalStateException: missing behavior definition for the preceeding method call xxx
An example:
Say we have a interface named Subject which has a member method as follows:
Then we should use EasyMock to mock this interface in following way:
Note the line contains andReturn. If you missed the call to andReturn, EasyMock will throw out the above IllegalStateException.
- EasyMock: missing behavior definition for the preceeding method call
- EasyMock: missing behavior definition for the preceeding method call
- 关于导入包不全导致的The method createCall() from the type Service refers to the missing type Call错误
- missing context for method declaration
- IOS : Missing context for method declaration Error
- EasyMock.isA method
- The Power Method for Eigenvectors
- missing arguments for method toArray in trait Collection
- Excel for Starters: The Missing Manual (Missing Manual)
- What’s the behavior when calling an overwritten virtual method in the constructor method of a base class?
- Phase activities definition for the whole software lifecycle
- A definition for the symbol '<symbolName>' could not be located
- Access for Starters: The Missing Manual
- Office 2008 for Macintosh: The Missing Manual
- Vegas--the missing matplotlib for scala
- a missing vtable usually means the first non-inline virtual member function has no definition.
- A missing vtable usually means the first non-inline virtual member function has no definition
- NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
- 博客工具入门之Google Analytics
- 在vc6实现png图像文件的显示方法
- 热烈庆祝开博
- jxl导出excel
- Oracle数据库下创建用户并授予权限
- EasyMock: missing behavior definition for the preceeding method call
- jQuery1.4.2与json格式兼容问题
- vc 中 CheckBox 有时候感觉失效,点击的时候没有选上,打不上勾
- 怎样应用Javascirpt中的异常处理机制
- 现在学软件的还没当保安,服务员工资高!!
- 序列化与反序列化操作
- 2010年6月10日俱乐部北京活动,“如何做研发人员绩效管理?”主题研讨活动
- 诺基亚N系旗舰机型全面启用MeeGo 弃用塞班
- study ror