markus1189 / mockito-scala

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

Alternative verification API #3

Open hseeberger opened 7 years ago

hseeberger commented 7 years ago

I don't like giving the mock as an argument to the verification methods, e.g. one(m) in the following snippet from the examples:

there.was.one(m).baz(any[Int])

Maybe something like the following reads more nicely?

m had one(baz(any[Int])) // or maybe received instead of had?
markus1189 commented 7 years ago

That definitely reads more nicely, but we would have to seriously bend the rules to achieve this.

Currently one(m) returns m's type, so we can call .baz on it, but in the example above the invocation of baz is not on m...