I have this method
def addFriend(friendId:String)(userId:String)
I am trying to stub it like this :
(repositoryMock.addFriend(_:String)(_:String)) when ("bar","foo") returns true
but of course it will not work . and couldn't do something like (doesn't compile)
(repositoryMock.addFriend(_:String)(_:String)) when ("bar")("foo") returns true
any ideas ?
The solution is what you first tried - put all the curried arguments in a single list:
(repositoryMock.addFriend(_:String)(_:String)) when ("bar", "foo") returns true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With