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: 257198124
  • Loading branch information
Material Design Team authored and ikim24 committed Jul 9, 2019
1 parent 27b507f commit 14a811d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
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.times;
Expand Down

0 comments on commit 14a811d

Please sign in to comment.