|
33 | 33 | import static org.junit.Assert.assertEquals; |
34 | 34 | import static org.junit.Assert.assertFalse; |
35 | 35 | import static org.junit.Assert.assertNotNull; |
| 36 | +import static org.junit.Assert.assertNull; |
36 | 37 | import static org.junit.Assert.assertTrue; |
37 | 38 | import static org.mockito.ArgumentMatchers.any; |
38 | 39 | import static org.mockito.Mockito.mock; |
|
51 | 52 | import android.view.Menu; |
52 | 53 | import android.view.MenuItem; |
53 | 54 | import android.view.MotionEvent; |
54 | | -import android.view.PointerIcon; |
55 | 55 | import android.view.View; |
56 | 56 | import android.view.ViewGroup; |
57 | 57 | import androidx.annotation.ColorInt; |
@@ -706,18 +706,17 @@ public void testSavedState() throws Throwable { |
706 | 706 | @TargetApi(Build.VERSION_CODES.N) |
707 | 707 | public void testPointerIcon() throws Throwable { |
708 | 708 | final Activity activity = activityTestRule.getActivity(); |
709 | | - final PointerIcon expectedIcon = PointerIcon.getSystemIcon(activity, PointerIcon.TYPE_HAND); |
710 | 709 | final MotionEvent event = MotionEvent.obtain(0, 0, MotionEvent.ACTION_HOVER_MOVE, 0, 0, 0); |
711 | 710 | final Menu menu = bottomNavigation.getMenu(); |
712 | 711 | for (int i = 0; i < menu.size(); i++) { |
713 | 712 | final MenuItem item = menu.getItem(i); |
714 | 713 | assertTrue(item.isEnabled()); |
715 | 714 | final View itemView = activity.findViewById(item.getItemId()); |
716 | | - assertEquals(expectedIcon, itemView.onResolvePointerIcon(event, 0)); |
| 715 | + assertNull(itemView.onResolvePointerIcon(event, 0)); |
717 | 716 | item.setEnabled(false); |
718 | | - assertEquals(null, itemView.onResolvePointerIcon(event, 0)); |
| 717 | + assertNull(itemView.onResolvePointerIcon(event, 0)); |
719 | 718 | item.setEnabled(true); |
720 | | - assertEquals(expectedIcon, itemView.onResolvePointerIcon(event, 0)); |
| 719 | + assertNull(itemView.onResolvePointerIcon(event, 0)); |
721 | 720 | } |
722 | 721 | } |
723 | 722 |
|
|
0 commit comments