History log of /packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
17d3a29c9d8f7a27c463239f190bdcc4e0804527 27-Nov-2013 Jerry Xie <jjx@google.com> Get Email units to compile

Change-Id: I171a0e2421c5006d9862ad94f886932146547020
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
6e418aa41a17136be0dddb816d843428a0a1e722 19-Jun-2011 Marc Blank <mblank@google.com> Improve EmailContent caching...

* Guarantee that up to 16 Account (with HostAuths), and Policy rows
are always cached. Also, 6 commonly used Mailboxes per Account
(Inbox, Outbox, Drafts, Sent, Trash, and Search)
* Precache these rows when EmailProvider starts up
* Ensure that newly added, precachable rows are cached when created
* Clean up some inefficient/wrong caching code
* Fix a commonly called method in NotificationManager in which we
load a single Mailbox row using selection vs withAppendedId
* Confirm that we don't read from the database in typical use and
heavy message loading
* Add a special URI for finding mailbox by type (using the cache)
* Add special-case code for EmailContent.count(Account.CONTENT_URI)
which is used in a number of places (including on the UI thread)
and whose value is easily determined
* Add a special URI to get the default account id
* Confirm that all unit tests work

The goal here is to be able to load all Account, HostAuth, Policy,
and Mailbox objects (by id) without worrying about disk access.
There will still be a single disk read for uncommon Mailbox reads,
but this should be considered acceptable.

Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210
TODO: Unit tests
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
369905c95d8b069205f30726edc54122e6bc388f 21-Jun-2011 Makoto Onuki <omakoto@google.com> Fix crashing tests

Some of the tests are still failing, but at least now we can go through till
the end.

- Fixed NPE in WelcomeTests (caused by the mock context not returning a proper
layout inflator.)
- Removed the rainy day test from MessageFileViewTest.
(Not setting a proper intent will result in the argument check in
MessageFileViewFragment)
- Removed unnecessary null check in EmailProvider.getDatabase()

Bug 4766072

Change-Id: I48b92cc91d0417cd9980c131fda8f63a9a6eb990
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
2f371e85537a199cfa8a489007916dab56215a6d 10-May-2011 Todd Kennedy <toddke@google.com> Add notification table shared preference

The notifiaction table will be used by the updated notification controller.
The table stores the key and the associated last notified message key and
message count.

Change-Id: I037b5374ab51620f1cffc8b41391db858cfd3a2d
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
31d9acbf0623872f9d4a2b3210b5970854b654c7 12-Feb-2011 Marc Blank <mblank@google.com> Email split, part huit: Refactor constants, clean emailcommon

* There are three pieces to this CL (sorry):
1) Move and/or rename some constants into emailcommon
2) Move Utility to emailcommon, moving the few UI
related utilities back into Email (FolderProperties
and UiUtilities)
3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
a7bc0319a75184ad706bb35c049af107ac3688e6 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part six: EmailContent

* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
8a574694606f0e5d781334d0d426fc379c51f3ed 09-Feb-2011 Marc Blank <mblank@google.com> Email split, part trois: AccountService

* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
c849936a36424645af73dc307b19778a89d6ee84 13-Dec-2010 Makoto Onuki <omakoto@google.com> Fix unit tests

- Now ProviderContextSetupHelper.getProviderContext() invalidates DB cache

* MailboxAccountLoaderTestCase
- Save hostauth properly
- (ProviderContextSetupHelper invalidates cache before each test)

Bug 3280911

* SmtpSenderUnitTests
- Use ProviderContextSetupHelper to create isolated context,
which now also invalidates DB cache

Bug 3280913

* MailboxFinderTest
- When kicking Controller.Result methods directly from tests,
call the raw callback, rather than the one wrapped with
ControllerResultUiThreadWrapper, to make it synchronous.

Bug 3280898

* MessageViewTest
- Disable testOpenMessage()
This test doesn't work because it sets up test data in an isolated
context but the activity/fragment don't see them because they
use the real context.
I have no idea why it worked before... Maybe because there were
accounts/mailbox/message with the same ID in the DB by chance.

Bug 3280905

Change-Id: I6beb08c58fff102e90bebd2c35f70820268b9e62
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
74e094834c6efd3260c717090a89232a892c411b 03-Dec-2010 Makoto Onuki <omakoto@google.com> New style for the new message notification

Bug 3176956

Change-Id: Id7418fb8bb942230266815167f0a2e79062a9116
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
d1ee5b8fa5fe92df1ded5953a9e3f001b38a1ac7 30-Nov-2010 Makoto Onuki <omakoto@google.com> EML viewer: Set title, and show arrow next to the app icon

- Set "Viewing FILENAME" as title.
- Home icon now has "back" arrow. Closes the activity when clicked.

Bug 3221312

Change-Id: I689499e10704d3c5d206df4aa12e21db9687c4c5
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
b8f31d5490eba7f307ee578426020bff2ee528ec 30-Jul-2010 Makoto Onuki <omakoto@google.com> Helper to create isolated context for provider tests.

The logic came from ProviderTestCase2, but it can be used with other
kind of test cases, such as InstrumentationTestCase.

Extracted from an existing class. We'll need it for new activity tests.

Change-Id: I5741f01d4749fd397704cef330082470f6051bcf
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java
bcf32320e2600e96c8a9e997a8903bfc3893b35e 27-Jul-2010 Makoto Onuki <omakoto@google.com> Move isSecurityHold/clearAccountHoldFlags to Account

- Added unit tests
- I see the "open a cursor, move to the first row, read a column" pattern over
and over. Added a utility method for this. (Let's try not to bloat the
binary by copying code around!)
- Added helper classes for database related tests
- Removed code dup

Change-Id: I380959215cc1661b252158f0f6e35369b499cdf8
/packages/apps/Email/tests/src/com/android/email/DBTestHelper.java