Scala Spec2 Mockito: Argument matchers with complex types

余生长醉 提交于 2019-12-06 15:14:21
wsRequestHolder.post(any[Map[String,Seq[String]]]) returns futureResponse

Note that post actually has a couple extra implicit parameters there:

def post [T] (body: T)(implicit wrt: Writeable[T], ct: ContentTypeOf[T]):
    Promise[Response]

...which probably need to be matched explicitly, as in this spec2-users thread.

It seems the wsRequestHolder.post method requires three parameters, so Mockito expects you to send three (e.g. any[]) matchers, but you provided matchers for only one of them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!