Closed hseeberger closed 7 years ago
We should add one more invocation to demonstrate what happens when we invoke more often than the number of given values:
{ // Specifying multiple returns val m = mock[Foo] m.bar returnsMulti Seq("1", "2", "3") m.bar // => "1" m.bar // => "2" m.bar // => "3" m.bar // => "3" }
Not sure if "3" is correct, hence my interest in this topic ;-)
Agreed, that should be added as an example. It is the way mockito behaves with chained thenReturn so I guess it is "correct" ;)
thenReturn
We should add one more invocation to demonstrate what happens when we invoke more often than the number of given values:
Not sure if "3" is correct, hence my interest in this topic ;-)