• This exception may occur if matchers are combined with raw values


    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.

  • 相关阅读:
    课程总结第十一周
    用户场景分析
    团队冲刺10
    课程总结第十周
    团队冲刺09
    梦断代码阅读笔记03
    转发和重定向的区别
    request
    servletConfig
    servlet
  • 原文地址:https://www.cnblogs.com/softidea/p/4166835.html
Copyright © 2020-2023  润新知