Skip to content

Commit

Permalink
Migrate org.mockito.Matchers#any* to org.mockito.ArgumentMatchers
Browse files Browse the repository at this point in the history
The former is deprecated and replaced by the latter in Mockito 2. However, there is a
functional difference: ArgumentMatchers will reject `null` and check the type
if the matcher specified a type (e.g. `any(Class)` or `anyInt()`). `any()` will
remain to accept anything.

PiperOrigin-RevId: 257198237
  • Loading branch information
Material Design Team authored and ikim24 committed Jul 9, 2019
1 parent 14a811d commit 17a2079
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static org.hamcrest.Matchers.lessThan;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
Expand Down

0 comments on commit 17a2079

Please sign in to comment.