Home
last modified time | relevance | path

Searched refs:mMockContext (Results 1 – 20 of 20) sorted by relevance

/packages/apps/Email/tests/src/com/android/email/provider/
DProviderTests.java77 private Context mMockContext; field in ProviderTests
123 mMockContext = new MockContext2(getMockContext(), getContext()); in setUp()
151 SQLiteDatabase db = getProvider().getDatabase(mMockContext); in setMinusOneToMessageCounts()
157 return Utility.getFirstRowInt(mMockContext, in getMessageCount()
191 Account account1 = ProviderTestUtils.setupAccount("account-save", true, mMockContext); in testAccountSave()
194 Account account2 = Account.restoreAccountWithId(mMockContext, account1Id); in testAccountSave()
204 Account account1 = ProviderTestUtils.setupAccount("account-hostauth", false, mMockContext); in testAccountSaveHostAuth()
207 ProviderTestUtils.setupHostAuth("account-hostauth-recv", -1, false, mMockContext); in testAccountSaveHostAuth()
209 ProviderTestUtils.setupHostAuth("account-hostauth-send", -1, false, mMockContext); in testAccountSaveHostAuth()
210 account1.save(mMockContext); in testAccountSaveHostAuth()
[all …]
DAttachmentProviderTests.java55 Context mMockContext; field in AttachmentProviderTests
65 mMockContext = getMockContext(); in setUp()
66 mMockResolver = mMockContext.getContentResolver(); in setUp()
70 mEmailProvider.attachInfo(mMockContext, null); in setUp()
83 Account account1 = ProviderTestUtils.setupAccount("attachment-query", false, mMockContext); in testQuery()
85 account1.save(mMockContext); in testQuery()
109 false, mMockContext); in testQuery()
116 false, mMockContext); in testQuery()
123 false, mMockContext); in testQuery()
172 Account a1 = ProviderTestUtils.setupAccount("inboxquery-1", true, mMockContext); in testInboxQuery()
[all …]
DPolicyTests.java49 private Context mMockContext; field in PolicyTests
58 mMockContext = getMockContext(); in setUp()
71 Account account1 = ProviderTestUtils.setupAccount("acct1", true, mMockContext); in testGetAccountIdWithPolicyKey()
73 SecurityPolicy.setAccountPolicy(mMockContext, account1, policy1, securitySyncKey); in testGetAccountIdWithPolicyKey()
74 Account account2 = ProviderTestUtils.setupAccount("acct2", true, mMockContext); in testGetAccountIdWithPolicyKey()
76 SecurityPolicy.setAccountPolicy(mMockContext, account2, policy2, securitySyncKey); in testGetAccountIdWithPolicyKey()
78 account1.refresh(mMockContext); in testGetAccountIdWithPolicyKey()
79 account2.refresh(mMockContext); in testGetAccountIdWithPolicyKey()
84 assertEquals(account1.mId, Policy.getAccountIdWithPolicyKey(mMockContext, in testGetAccountIdWithPolicyKey()
86 assertEquals(account2.mId, Policy.getAccountIdWithPolicyKey(mMockContext, in testGetAccountIdWithPolicyKey()
[all …]
DAccountBackupRestoreTests.java40 private Context mMockContext; field in AccountBackupRestoreTests
49 mMockContext = getMockContext(); in setUp()
86 ProviderTestUtils.setupAccount("testBackup1", false, mMockContext); in testBackupAndRestore()
88 ProviderTestUtils.setupHostAuth("legacy-recv", 0, false, mMockContext); in testBackupAndRestore()
90 ProviderTestUtils.setupHostAuth("legacy-send", 0, false, mMockContext); in testBackupAndRestore()
91 saved1.save(mMockContext); in testBackupAndRestore()
93 ProviderTestUtils.setupAccount("testBackup2", false, mMockContext); in testBackupAndRestore()
95 ProviderTestUtils.setupHostAuth("legacy-recv", 0, false, mMockContext); in testBackupAndRestore()
97 ProviderTestUtils.setupHostAuth("legacy-send", 0, false, mMockContext); in testBackupAndRestore()
98 saved2.save(mMockContext); in testBackupAndRestore()
[all …]
DContentCacheTests.java47 Context mMockContext; field in ContentCacheTests
56 mMockContext = getMockContext(); in setUp()
136 final ContentResolver resolver = mMockContext.getContentResolver(); in testCachedCursors()
137 final Context context = mMockContext; in testCachedCursors()
/packages/apps/Email/tests/src/com/android/email/
DSecurityPolicyTests.java48 private Context mMockContext; field in SecurityPolicyTests
60 mMockContext = new MockContext2(getMockContext(), mContext); in setUp()
130 mSecurityPolicy = SecurityPolicy.getInstance(mMockContext); in testAggregator()
136 ProviderTestUtils.setupAccount("no-sec-1", true, mMockContext); in testAggregator()
137 ProviderTestUtils.setupAccount("no-sec-2", true, mMockContext); in testAggregator()
142 Account a3 = ProviderTestUtils.setupAccount("sec-3", true, mMockContext); in testAggregator()
145 SecurityPolicy.setAccountPolicy(mMockContext, a3, p3ain, null); in testAggregator()
153 SecurityPolicy.setAccountPolicy(mMockContext, a3, p3bin, null); in testAggregator()
168 Account a4 = ProviderTestUtils.setupAccount("sec-4", true, mMockContext); in testAggregator()
169 SecurityPolicy.setAccountPolicy(mMockContext, a4, p4in, null); in testAggregator()
[all …]
/packages/apps/Email/tests/src/com/android/emailcommon/utility/
DUtilityMediumTests.java49 Context mMockContext; field in UtilityMediumTests
58 mMockContext = getMockContext(); in setUp()
63 Account account1 = ProviderTestUtils.setupAccount("account1", false, mMockContext); in testFindExistingAccount()
64 account1.mHostAuthRecv = ProviderTestUtils.setupHostAuth("ha1", -1, false, mMockContext); in testFindExistingAccount()
65 account1.mHostAuthSend = ProviderTestUtils.setupHostAuth("ha1", -1, false, mMockContext); in testFindExistingAccount()
66 account1.save(mMockContext); in testFindExistingAccount()
67 Account account2 = ProviderTestUtils.setupAccount("account2", false, mMockContext); in testFindExistingAccount()
68 account2.mHostAuthRecv = ProviderTestUtils.setupHostAuth("ha2", -1, false, mMockContext); in testFindExistingAccount()
69 account2.mHostAuthSend = ProviderTestUtils.setupHostAuth("ha2", -1, false, mMockContext); in testFindExistingAccount()
70 account2.save(mMockContext); in testFindExistingAccount()
[all …]
/packages/apps/Email/tests/src/com/android/email/service/
DEmailBroadcastProcessorServiceTests.java42 Context mMockContext; field in EmailBroadcastProcessorServiceTests
51 mMockContext = getMockContext(); in setUp()
74 Integer flags = Utility.getFirstRowInt(mMockContext, uri, in getAccountFlags()
87 Account account1 = ProviderTestUtils.setupAccount("eas-account1", false, mMockContext); in testSetImapDeletePolicy()
90 account1.save(mMockContext); in testSetImapDeletePolicy()
92 Account account2 = ProviderTestUtils.setupAccount("pop-account1", false, mMockContext); in testSetImapDeletePolicy()
96 account2.save(mMockContext); in testSetImapDeletePolicy()
98 Account account3 = ProviderTestUtils.setupAccount("pop-account2", false, mMockContext); in testSetImapDeletePolicy()
101 account3.save(mMockContext); in testSetImapDeletePolicy()
103 Account account4 = ProviderTestUtils.setupAccount("imap-account1", false, mMockContext); in testSetImapDeletePolicy()
[all …]
DAttachmentDownloadServiceTests.java45 private Context mMockContext; field in AttachmentDownloadServiceTests
58 mMockContext = getMockContext(); in setUp()
61 mAccount = ProviderTestUtils.setupAccount("account", false, mMockContext); in setUp()
63 mAccount.save(mMockContext); in setUp()
66 mMailbox = ProviderTestUtils.setupMailbox("mailbox", mAccountId, true, mMockContext); in setUp()
72 mService.mContext = mMockContext; in setUp()
97 true, mMockContext); in testDownloadSet()
99 Attachment.FLAG_DOWNLOAD_USER_REQUEST, true, mMockContext); in testDownloadSet()
101 Attachment.FLAG_DOWNLOAD_FORWARD, true, mMockContext); in testDownloadSet()
103 Attachment.FLAG_DOWNLOAD_FORWARD, true, mMockContext); in testDownloadSet()
[all …]
/packages/apps/Email/tests/src/com/android/emailcommon/internet/
DRfc822OutputTests.java81 private Context mMockContext; field in Rfc822OutputTests
91 mMockContext = getMockContext(); in setUp()
92 mForwardIntro = mMockContext.getString(R.string.message_compose_fwd_header_fmt, SUBJECT, in setUp()
111 message.save(mMockContext); in createTestMessage()
117 Body body = Body.restoreBodyWithMessageId(mMockContext, message.mId); in createTestBody()
137 message1.save(mMockContext); in testBuildBodyText()
146 message1.save(mMockContext); in testBuildBodyText()
155 message1.save(mMockContext); in testBuildBodyText()
170 message2.save(mMockContext); in testBuildBodyText()
179 message2.save(mMockContext); in testBuildBodyText()
[all …]
/packages/apps/Email/tests/src/com/android/emailcommon/provider/
DMailboxTests.java52 private Context mMockContext; field in MailboxTests
62 mMockContext = getMockContext(); in setUp()
74 return Utility.getFirstRowInt(mMockContext, in getMessageCount()
97 final Context c = mMockContext; in testSave()
113 final Context c = mMockContext; in testDelete()
147 final Context c = mMockContext; in testGetMailboxType()
159 final Context c = mMockContext; in testGetDisplayName()
171 final Context c = mMockContext; in testIsRefreshable()
193 final Context c = mMockContext; in testCanMoveFrom()
208 final Context c = mMockContext; in testGetMailboxForMessageId()
[all …]
DQuickResponseTests.java33 private Context mMockContext; field in QuickResponseTests
43 mMockContext = getMockContext(); in setUp()
/packages/apps/Email/tests/src/com/android/email/mail/
DStoreTests.java43 private Context mMockContext; field in StoreTests
48 mMockContext = getMockContext(); in setUp()
64 Account testAccount = ProviderTestUtils.setupAccount("pop", false, mMockContext); in testGetInstance()
69 testAccount.save(mMockContext); in testGetInstance()
77 testAccount = ProviderTestUtils.setupAccount("pop", false, mMockContext); in testGetInstance()
82 testAccount.save(mMockContext); in testGetInstance()
89 testAccount = ProviderTestUtils.setupAccount("unknown", false, mMockContext); in testGetInstance()
/packages/apps/UnifiedEmail/tests/src/com/android/mail/browse/
DConversationCursorTests.java41 Context mMockContext; field in ConversationCursorTests
59 mMockContext = getMockContext(); in setUp()
60 mMockResolver = (MockContentResolver)mMockContext.getContentResolver(); in setUp()
61 mMockResolver.addProvider(TestProvider.AUTHORITY, new TestProvider(mMockContext)); in setUp()
DTestProviderTests.java37 Context mMockContext; field in TestProviderTests
61 mMockContext = getMockContext(); in setUp()
62 mMockResolver = (MockContentResolver)mMockContext.getContentResolver(); in setUp()
63 mMockResolver.addProvider(CANHAZ_AUTHORITY, new TestProvider(mMockContext)); in setUp()
/packages/apps/Email/tests/src/com/android/email/mail/store/
DPop3StoreUnitTests.java56 private Context mMockContext; field in Pop3StoreUnitTests
65 mMockContext = DBTestHelper.ProviderContextSetupHelper.getProviderContext( in setUp()
69 TempDirectory.setTempDirectory(mMockContext); in setUp()
73 Account testAccount = ProviderTestUtils.setupAccount("acct1", false, mMockContext); in setUp()
78 testAccount.save(mMockContext); in setUp()
79 mStore = (Pop3Store) Pop3Store.newInstance(testAccount, mMockContext); in setUp()
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/model/
DContactLoaderTest.java45 private ContactsMockContext mMockContext; field in ContactLoaderTest
51 mMockContext = new ContactsMockContext(getContext()); in setUp()
52 mContactsProvider = mMockContext.getContactsProvider(); in setUp()
73 mMockContext = null; in tearDown()
79 final ContactLoader loader = new ContactLoader(mMockContext, uri, true); in assertLoadContact()
/packages/apps/Exchange/tests/src/com/android/exchange/
DEasAccountServiceTests.java30 Context mMockContext; field in EasAccountServiceTests
35 mMockContext = getContext(); in setUp()
DEasSyncServiceTests.java44 Context mMockContext; field in EasSyncServiceTests
49 mMockContext = getContext(); in setUp()
/packages/apps/Exchange/tests/src/com/android/exchange/provider/
DMockProviderTests.java43 Context mMockContext; field in MockProviderTests
67 mMockContext = getMockContext(); in setUp()