How do you mock scala call-by name in Mockito

前端 未结 2 967
闹比i
闹比i 2021-01-15 19:47

Im trying to mock scala call-by name method in mockito. But running into this error.

This exception may occur if matchers are combined with raw value

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 20:07

    Can't do it with Mockito: Verifying by-name parameters in Mockito

    Should be able to do it with scalamock: How to mock a call-by-name argument (like getOrElse) using ScalaMock?

提交回复
热议问题