mockito
mockito copied to clipboard
Decide on the path forward once `matcher` is no longer the recommended solution
Currently argThat takes a Matcher.
Ideally it would be nice to decouple mockito from a specific matching framework, and then be be able to plug in versions of argThat using alternatives. We could continue to support using Matcher with mockito through a new package mockito_arg_matchers or something similar, and publish an alternative with a different API.
Maybe we could add something like argPredicate<T>(bool Function(T) matches), and then alternative packages could implement APIs on that.
No action needed yet, just wanted to have this on your radar @srawlins
It would be OK if we keep mockito using Matcher for at least a while - tests can use a new framework for most conditions, and import matcher just for use with argThat.
Thanks for the heads-up!
We could continue to support using
Matcherwithmockitothrough a new packagemockito_arg_matchersor something similar, and publish an alternative with a different API.
Would this specifically be done as a new package, not a new library? A new library would be simplest.
A new package, I'll share an internal doc with more details.