Search in sources :

Example 1 with QuickAccessWalletClient

use of android.service.quickaccesswallet.QuickAccessWalletClient in project android_packages_apps_Settings by omnirom.

the class WalletPrivacyPreferenceControllerTest method setUp.

@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    mContext = RuntimeEnvironment.application;
    mContentResolver = mContext.getContentResolver();
    FakeFeatureFactory featureFactory = FakeFeatureFactory.setupForTest();
    when(featureFactory.securityFeatureProvider.getLockPatternUtils(mContext)).thenReturn(mLockPatternUtils);
    when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true);
    when(mClient.isWalletServiceAvailable()).thenReturn(true);
    mController = new WalletPrivacyPreferenceController(mContext, TEST_KEY) {

        @Override
        QuickAccessWalletClient initWalletClient() {
            return mClient;
        }
    };
}
Also used : QuickAccessWalletClient(android.service.quickaccesswallet.QuickAccessWalletClient) FakeFeatureFactory(com.android.settings.testutils.FakeFeatureFactory) Before(org.junit.Before)

Aggregations

QuickAccessWalletClient (android.service.quickaccesswallet.QuickAccessWalletClient)1 FakeFeatureFactory (com.android.settings.testutils.FakeFeatureFactory)1 Before (org.junit.Before)1