Add tests for some security setting controllers

Bug: 32953042
Test: robotests
Change-Id: Ieab4e6434bbb80313f6d1b25ff1cdea5713038f0
This commit is contained in:
Fan Zhang
2018-01-05 11:18:44 -08:00
parent 361e55bb4c
commit cf97f0b643
14 changed files with 708 additions and 60 deletions

View File

@@ -59,8 +59,7 @@ public class SwipeToNotificationPreferenceControllerTest {
MockitoAnnotations.initMocks(this);
mController = new SwipeToNotificationPreferenceController(mContext, null, KEY_SWIPE_DOWN);
when(mContext.getPackageManager()).thenReturn(mPackageManager);
// Explicit casting to object due to MockitoCast bug
when((Object) mContext.getSystemService(FingerprintManager.class))
when(mContext.getSystemService(Context.FINGERPRINT_SERVICE))
.thenReturn(mFingerprintManager);
}