New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: add Mockito.timeout(java.time.Duration) and after(java.time.Duration) #1815
Comments
That would makes sense to me. Feel free to open a PR to add these methods. @mockito/developers We have a lot of evidence of |
Ideally we'd plumb the
I assume |
Yes, any API in |
I second that, now that mockito 3 is java 8 based ! |
Representing durations as
long
's is very error prone. We've seen (and fixed) hundreds of unit mismatch bugs inside of Google.We (Guava) have recently updated most of our public APIs to add
java.time.Duration
-based overloads. Caffeine and Selenium have done so as well.Basically, I'd like to see the following APIs added:
Mockito.after(java.time.Duration)
Mockito.timeout(java.time.Duration)
And ideally the
long
-accepting APIs would be deprecated.The text was updated successfully, but these errors were encountered: