markus1189 / mockito-scala

Syntactic sugar for mockito in Scala
Apache License 2.0
6 stars 0 forks source link

Make answering more convenient #2

Open hseeberger opened 7 years ago

hseeberger commented 7 years ago

In the following snippet from the examples the argument type InvocationOnMock of the function is ugly:

m.baz(any[Int]) answers { (inv: InvocationOnMock) =>
      s"answers: ${inv.getArgument[Int](0) * 2}"
    }

Would it be possible to provide an API which expects a nicely typed function, i.e. Int => A in this case?