码迷,mamicode.com
首页 > 其他好文 > 详细

This exception may occur if matchers are combined with raw values

时间:2014-12-16 13:19:07      阅读:1031      评论:0      收藏:0      [点我收藏+]

标签:ar   io   sp   for   java   on   bs   ad   amp   

 

org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
3 matchers expected, 2 recorded:
-> at com.FilterDeviceReplaceTest.init(FilterDeviceReplaceTest.java:41)
-> at com.FilterDeviceReplaceTest.init(FilterDeviceReplaceTest.java:46)

This exception may occur if matchers are combined with raw values:
    //incorrect:
    someMethod(anyObject(), "raw String");
When using matchers, all arguments have to be provided by matchers.
For example:
    //correct:
    someMethod(anyObject(), eq("String by matcher"));

For more info see javadoc for Matchers class.

 

This exception may occur if matchers are combined with raw values

标签:ar   io   sp   for   java   on   bs   ad   amp   

原文地址:http://www.cnblogs.com/softidea/p/4166835.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!