cketti
0fe74e59cc
Don't hardcode check for version in SettingsExporterTest
...
Otherwise every time we add a setting this test needs to be touched.
2017-01-04 23:56:59 +01:00
Vincent Breitmoser
a055ed42a8
don't handle format parameter in setBody(), style fixes
2016-12-12 14:24:30 +01:00
Vincent Breitmoser
dc3d1f0e87
support display of format=flowed (rfc2646)
2016-12-12 14:24:30 +01:00
cketti
db1b97d23f
Fix tests
2016-12-12 06:51:28 +01:00
cketti
29dc3dd03c
Merge pull request #1808 from philipwhiuk/testingSettingsImportExport
...
Testing for settings import and export
2016-12-12 01:04:58 +01:00
cketti
5fca3c871d
Merge pull request #1847 from k9mail/multipart-attachments
...
Handle attachments with CHILD_PART_CONTAINS_DATA data location
2016-12-11 02:45:00 +01:00
Vincent Breitmoser
0ecbf441c1
handle attachments with CHILD_PART_CONTAINS_DATA data location (message/rfc822)
2016-12-11 02:33:56 +01:00
cketti
87e13ef800
Merge pull request #1836 from k9mail/multipart-digest-content-type
...
Properly handle multipart/digest content type
2016-12-09 00:18:59 +01:00
Vincent Breitmoser
7bd85189ce
add test for multipart/digest message
2016-12-07 00:23:28 +01:00
Vincent Breitmoser
422806f622
ignore leading whitespace for pgp/inline messages in MessageDecryptVerifier ( fixes #1823 )
2016-11-29 19:22:31 +01:00
Philip Whitehouse
f03a01f6dc
BDD new lines
2016-11-27 02:16:15 +00:00
Philip Whitehouse
6f82dea315
Testing for SettingsExporter
2016-11-22 01:52:57 +00:00
Philip Whitehouse
68b670e7d8
Testing for SettingsImporter
2016-11-22 01:24:41 +00:00
Vincent Breitmoser
ef3cda97e2
remove support for clearsigned messages in PgpMessageBuilder
2016-11-14 18:56:26 +01:00
Vincent Breitmoser
640322d46d
add "name" parameter to signature content-type header
2016-11-12 22:08:43 +01:00
Vincent Breitmoser
4e17fdf1a6
remove "always sign, encrypt if possible" mode of operation from PgpMessageBuilder
2016-11-12 21:53:02 +01:00
Vincent Breitmoser
cedaecb38e
Merge pull request #1769 from k9mail/attachment-ninjafix
...
use AttachmentTempFileProvider to expose file-backed content uris
2016-11-08 11:21:39 +01:00
cketti
bc41d9124e
Merge pull request #1714
...
Added some more coverage to the MessageReferenceTest
2016-11-08 11:16:39 +01:00
cketti
5b0544cbab
Clean up new tests
2016-11-08 11:13:57 +01:00
Vincent Breitmoser
be45380415
use AttachmentTempFileProvider to expose file-backed content uris
2016-11-03 13:57:19 +01:00
Vincent Breitmoser
380fd94b22
some more tests for PgpMessageBuilder
2016-11-02 14:30:51 +01:00
Vincent Breitmoser
c7a637f21b
don't sign in opportunistic mode if sign-only isn't supported
2016-10-31 07:57:08 +01:00
cketti
ffd051b0ec
Don't use same notification group key for all accounts
2016-10-18 06:21:25 +02:00
Jonas Lundqvist
21df74f7f4
Added test for MessageReference.withModifiedFlag()
2016-10-12 23:45:59 +02:00
Jonas Lundqvist
6ab4c3b3e6
Added test for MessageReference.withModifiedUid()
2016-10-12 23:45:55 +02:00
cketti
2087f0476c
Merge pull request #1691
...
Improve Activity operation text
Fixes #1685
2016-10-12 16:23:57 +02:00
cketti
e511b8b7c1
Further clean up of ActivityListenerTest
...
* \u0020 is a hack required to have spaces at the beginning of resource
strings. But there's no need to replicate this inside our tests.
* Dependencies shouldn't be static finals.
* Initialization of dependencies is usually boring. I like to extract that
code to methods and put them at the end of the file.
* Using different values for 'current progress' and 'total' has the
advantage of breaking tests when the two accidentally get mixed up.
2016-10-12 16:18:23 +02:00
Vincent Breitmoser
a88ccfd9e8
avoid indirect call to invalidateOptionsMenu() before recipientPresenter is initialized
2016-10-11 11:42:20 +02:00
Philip Whitehouse
0fff2ffd08
Update to Robolectric 3.1.1 and tidy up code
2016-10-09 02:21:14 +01:00
Philip
302b668d58
On removing notification, mark it's ID no longer in use ( #1677 )
...
On removing notification, mark it's ID no longer in use
Fixes #1662
2016-10-08 00:54:15 +02:00
Philip Whitehouse
53f3d549f7
Set account name when syncing headers & use correct folder name to generate display name
2016-10-07 23:14:54 +01:00
cketti
91c0b4274b
Clean up MessageBuilderTest
2016-10-07 05:40:20 +02:00
Philip Whitehouse
0cd52bc26b
Use the correct order for alternatives when building HTML messages
...
Fixes #1625
2016-10-07 01:09:31 +01:00
Vincent Breitmoser
f6e19680b0
add test for message/rfc822 attachment
2016-08-19 22:21:43 +02:00
Vincent Breitmoser
77a3892b0f
fix unit tests for 7bit/quoted-printable encoding
2016-08-19 22:21:43 +02:00
Vincent Breitmoser
08ef3d5ce5
clean up TextBody, make it slightly more failfast
...
Previously, TextBody supported only 8bit or quoted printable encodings,
defaulting to quoted printable if the encoding was not equal to "8bit".
This behavior is now changed to throw a runtime exception when an
unsupported encoding has been selected. The `setEncoding` method also
throws if an unsupported encoding is selected.
2016-08-16 12:21:09 +02:00
cketti
0bc5b49bb5
Fix MessageBuilderTest
2016-08-16 00:40:23 +02:00
cketti
77f9e82b41
Merge pull request #1559 from k9mail/deferred-file-body-fix
...
Fix DeferredFileBody
2016-08-16 00:07:41 +02:00
cketti
411ec0ec34
Use 'newInstance' as name for static factory methods
2016-08-15 11:48:36 +02:00
cketti
84cef1d8b1
Get rid of trivial static factory methods
2016-08-15 11:42:47 +02:00
cketti
7719153cc0
Extract code to generate Message-Id header value
...
This moves Message closer to being a dumb data class and avoids having to
pass around a UuidGenerator reference.
2016-08-15 10:22:17 +02:00
Vincent Breitmoser
f5656c331d
add tests for DeferredFileBody
2016-08-11 15:54:25 +02:00
Vincent Breitmoser
1e97f1ce16
inject UuidGenerator into MimeMessage via constructor instead of parameter
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
bb8e5a68df
rename UUIDGenerator to UuidGenerator
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
1c28e1c601
add MessageBuilder test for message with attachment
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
cd011349fe
make send date and timezone hiding build parameters in MessageBuilder
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
874b981ba6
get message boundaries from injected BoundaryGenerator in MessageBuilder
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
f4b0521bbb
get uuid from injected generator in message builder
2016-08-10 14:30:53 +02:00
Vincent Breitmoser
d6c50b4db6
add unit tests for PendingCommand serialization
2016-08-10 13:45:02 +02:00
Vincent Breitmoser
73c2b1e9ad
add unit tests for PendingCommand migration
2016-08-10 13:45:02 +02:00
cketti
915f44ab14
Merge pull request #1537 from k9mail/compose-attachments-from-viewinfo
...
Load attachments from AttachmentViewInfo in AttachmentPresenter
2016-08-05 04:33:03 +02:00
cketti
2626cb1115
Merge pull request #1523 from k9mail/server_name_suggestion
...
Suggest server name based on server type
2016-08-02 15:40:01 +02:00
Vincent Breitmoser
450356b577
add flag whether data is available to AttachmentViewInfo
2016-08-01 16:03:22 +02:00
Vincent Breitmoser
3f0fb9fd3e
change tests to use more actual Part/Body classes instead of mocks
2016-07-28 14:53:57 +02:00
cketti
1cb32b0ce5
Suggest server name based on server type
2016-07-25 05:45:07 +02:00
Vincent Breitmoser
b7bcaf8deb
rename firstClassAttachment to inlineAttachment (with reversed logic)
2016-07-24 22:08:16 +02:00
Vincent Breitmoser
c1d57aa324
parts without name are still first class attachments
2016-07-24 21:05:13 +02:00
Vincent Breitmoser
7826febedb
Merge pull request #1511 from k9mail/sanitize-in-extract
...
Sanitize HTML in MessageViewExtractor instead of MessageWebView
2016-07-24 20:51:47 +02:00
Vincent Breitmoser
526448d18b
incorporate tests feedback
2016-07-24 20:51:37 +02:00
Vincent Breitmoser
773600c717
sanitize html in MessageViewInfoExtractor
...
also, inject HtmlSanitizer to keep MessageViewInfoExtractor testable and
pass Context through Globals
2016-07-24 20:51:37 +02:00
Vincent Breitmoser
65f2539e0b
move MessageViewInfoExtractorTest to unit tests
...
(Yes, I made sure these still run successfully!)
2016-07-24 20:50:35 +02:00
cketti
8df6a56a6f
Merge pull request #1521 from k9mail/attachment-count-encrypted
...
Set attachment count to zero for encrypted messages
2016-07-24 20:37:16 +02:00
Vincent Breitmoser
5c638dd205
use MessageDecryptVerifier methods in EncryptionDetector
2016-07-22 15:17:43 +02:00
Vincent Breitmoser
034b1eda41
compose: inject loader manager to RecipientSelectView via presenter ( fixes #1251 )
...
Conflicts:
k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java
2016-07-22 15:03:59 +02:00
cketti
2622b08767
Merge pull request #1484 from k9mail/decrypted-file-provider
...
decrypted file provider
2016-07-18 00:01:59 +02:00
cketti
d096261c56
Make use of Globals to simplify code
2016-07-17 23:02:10 +02:00
Vincent Breitmoser
8b719a3274
prefer real objects for Part in tests over mocks
2016-07-17 23:02:10 +02:00
Vincent Breitmoser
c4cb83d370
rename some classes from service to mailstore
2016-07-17 23:02:10 +02:00
Vincent Breitmoser
351737512b
fix deferred file body test
2016-07-17 23:02:10 +02:00
Vincent Breitmoser
69b0b3a763
split FileProvider logic, incorporate some other feedback
2016-07-17 23:02:09 +02:00
cketti
95c546d992
Merge pull request #1485 from k9mail/notifications_only_from_contacts
...
Setting: only show notifications for messages from contacts
2016-07-06 21:55:32 +02:00
Vincent Breitmoser
0e3d18e7f7
we don't use displayName from database either (for now), fix tests to reflect that
2016-07-06 21:48:39 +02:00
Vincent Breitmoser
bb9f857d86
add Attachment* tests, and some annotations
2016-07-06 21:48:38 +02:00
cketti
ee8dd311df
Pass Contacts via constructor into MessagingController
2016-07-05 01:34:40 +02:00
Vincent Breitmoser
1c8a6f05d0
make Attachment class immutable
2016-07-01 18:40:48 +02:00
Vincent Breitmoser
6371cde568
messageview: nicer handling of pendingintent in MessageList and MessageCryptoHelper
2016-06-30 10:49:05 +02:00
Vincent Breitmoser
b57ef10e90
messageview: add support for encapsulated signed parts ( fixes #576 )
2016-06-30 10:49:04 +02:00
Vincent Breitmoser
43efd6db0b
add some unit tests to MessageDecryptVerifier
2016-06-30 10:25:26 +02:00
Vincent Breitmoser
8f4ac55d6c
don't rely on cached metadata from database for attachment info
...
This commit removes use of LocalFolder.MessagePartType as an indication
of part types in AttachmentInfoExtractor. The enum was intended as a
caching mechanism to skip loading unimportant parts from the database,
but only the reading side was implemented. As the expected performance
gain is negligible, I disabled the reading side for now (computing the
data instead) and more explicitly disabled the writing side as well.
2016-06-13 17:11:47 +02:00
cketti
3762e1561f
Only test one thing per test method
2016-05-20 23:55:45 +02:00
cketti
56e8fc1d77
Remove redundant checks and ones that make tests needlessly brittle
2016-05-20 23:52:21 +02:00
cketti
7e829bbfb7
Fix test instead of adding null check to ListHeaders
2016-05-20 23:39:55 +02:00
Vincent Breitmoser
43899da77c
same signature to get replyTo and replyToAll addresses in ReplyToParser
2016-05-20 11:26:13 +02:00
Vincent Breitmoser
3de2360a43
inject ReplyToParser and test for use in initFromReplyTo
2016-05-17 16:39:27 +02:00
Vincent Breitmoser
f85bef1261
move reply to all logic into ReplyToParser and add tests
2016-05-17 16:00:40 +02:00
Vincent Breitmoser
b6cd69f247
compose: check that message is simple before applying PGP/INLINE encoding
2016-05-09 09:54:06 +02:00
Vincent Breitmoser
b6f540bfd9
compose: apply transfer encoding *after* PGP/INLINE signing
2016-05-09 09:54:06 +02:00
Vincent Breitmoser
8a58398cb8
add first tests for MessageBuilder
2016-05-09 09:54:06 +02:00
Vincent Breitmoser
665feffe70
add some tests for PgpMessageBuilder
2016-05-09 09:54:06 +02:00
cketti
0640a60362
Introduce hack to remove flakiness from MigrationTest
2016-04-30 02:33:39 +02:00
cketti
e6d84afacc
Merge pull request #1317 from philipwhiuk/messagingControllerImprovement
...
Tests for MessagingController
2016-04-29 03:25:00 +02:00
Philip Whitehouse
4bb116f2f4
Add tests for remote search
2016-04-23 01:20:01 +01:00
Vincent Breitmoser
e888ab8b4a
rename preview package to extractors
2016-04-22 13:22:17 +02:00
Philip Whitehouse
bb8042669b
Add tests for searchLocalMessagesSynchronous
2016-04-21 20:52:38 +01:00
Philip Whitehouse
da8b0c56e4
Tests for MessagingController
2016-04-21 01:51:02 +01:00
cketti
78715ed29f
Merge pull request #1248 from k9mail/GH-879_notify_on_authentication_failure
...
Notify user on authentication failure
2016-04-11 22:57:00 +02:00
cketti
c7562a9ff2
Merge pull request #1197
...
Add debugging for when file I/O fails
2016-04-08 12:53:43 +02:00
cketti
866cc08ff0
Show notification on authentication failures
2016-04-01 22:07:00 +02:00
cketti
74c6e76433
Merge pull request #1210 from k9mail/GH-1164_fix_preview_extraction_failure
...
Handle preview extraction failures
2016-03-29 08:01:03 +02:00
cketti
9bacb2d5bc
Merge pull request #1196
...
Testing improvements for various components
2016-03-24 09:16:02 +01:00
cketti
f6b32f2983
Code cleanup
2016-03-24 09:12:48 +01:00
Philip Whitehouse
8ffd250f47
Add test coverage to POP3 store and Account Creator. Document some area to improve
2016-03-24 05:42:41 +01:00
cketti
d93a7de367
Merge pull request #1174
...
Handle synchronizing empty folders
Fixes #1139
2016-03-24 05:22:04 +01:00
cketti
cd79f7e225
Code style fixes
2016-03-24 05:18:50 +01:00
Philip Whitehouse
fd0ea66ebe
Improve testing of synchronizeMailboxSynchronous
2016-03-24 05:18:41 +01:00
cketti
31235ae3cf
Flag preview extraction errors in the database
...
We can later use this information to try again extracting a preview snippet
from an affected message, e.g. after an app update that fixed a preview-related
bug.
2016-03-24 03:22:41 +01:00
cketti
245deef57c
Change PreviewTextExtractor to better handle error conditions
...
Fixes #1164
2016-03-24 03:22:34 +01:00
cketti
2dd689d1a6
Refactor/clean up code
2016-03-23 04:46:36 +01:00
Philip Whitehouse
2e33e0dd94
Add functionality for using List-Post as an option for replying to emails
2016-03-23 04:46:36 +01:00
Philip Whitehouse
a602b63224
Fix lots more un-checked values
2016-03-21 16:47:01 +00:00
cketti
ff85bff1cc
Refactor MessagingControllerTest
2016-03-13 14:11:15 +01:00
cketti
658aee07b5
Add method to stop MessagingController's background thread
2016-03-13 13:51:07 +01:00
Philip Whitehouse
92d7efeba4
Handle synchronizing empty folders
2016-03-12 04:29:37 +00:00
cketti
6ad1673da1
Refactor database migrations
...
Separate package, one class per migration
2016-02-20 01:24:20 +01:00
Vincent Breitmoser
863cb9a2e7
migration: some cleanup and better test coverage here and there
2016-02-08 23:26:33 +01:00
Vincent Breitmoser
057309c147
migration: test and nail down MimeStructureState behavior some more
2016-02-08 22:37:11 +01:00
Vincent Breitmoser
43aa969de7
migration: incorporate feedback
2016-02-08 22:08:38 +01:00
Vincent Breitmoser
4280537dde
migration: minor formatting fixes, add a bunch of tests
2016-02-04 18:51:13 +01:00
cketti
93df7525c4
Merge pull request #1021
...
Enable syncing while idle on Android M devices
2016-01-15 10:49:48 +01:00
cketti
3e23eeb289
Add tests for K9AlarmManager
2016-01-15 10:15:42 +01:00
cketti
b30ee72d76
Merge pull request #996
...
Extract code to decode mailto URIs
Fixes #964
2016-01-13 11:02:28 +01:00
cketti
b8bfd57c78
Clean up and add some tests
2016-01-13 10:14:05 +01:00
cketti
1c475033b0
Code style fixes
2016-01-13 09:29:31 +01:00
cketti
26bdd0bf45
Make MailToTest run on the JVM using Robolectric
2016-01-13 09:22:31 +01:00
cketti
fe822db1c6
Merge pull request #992 from k9mail/transitive-uidreversecomparator
...
Make UidReverseComparator transitive, order null elements to right
2016-01-07 01:55:40 +01:00
cketti
89321cf6eb
Make UidReverseComparator a top-level class
2016-01-07 01:28:51 +01:00
cketti
75121d85fe
Add more tests for UidReverseComparator
2016-01-07 01:25:41 +01:00
cketti
4ec6e88f4f
Rename method
2016-01-07 00:32:49 +01:00
cketti
e4432ffa6c
Fix assertions in UidReverseComparatorTest
2016-01-07 00:27:17 +01:00
cketti
10e8f7e0dd
Remove test with randomized input
2016-01-07 00:24:03 +01:00
Vincent Breitmoser
e1ca89bd5d
make UidReverseComparator transitive, order null elements to right ( fixes #969 )
2016-01-03 02:45:59 +01:00
cketti
5ceb384442
Don't manually select vector drawables for notifications
2015-12-29 17:53:15 +01:00
cketti
1cbc67f09a
Rename vector drawables used in notifications
2015-12-29 16:53:52 +01:00
cketti
abbefe42c5
Don't recreate pending intents for wear summary actions
2015-12-29 03:00:30 +01:00
cketti
c69b7400f8
Update to Robolectric 3.0
2015-12-22 17:54:57 +01:00
cketti
a5ad84481d
Merge pull request #959 from k9mail/display_encrypted_in_message_preview
...
Display "*Encrypted*" in message preview
2015-12-19 18:25:32 +01:00
cketti
fb10b66371
Check protocol parameter to exclude non-PGP/MIME encrypted/signed messages
...
Fixes #571
2015-12-16 23:20:11 +01:00
cketti
d6b4452ade
Display "*Encrypted*" in preview of encrypted messages
2015-12-16 21:33:19 +01:00
cketti
a0a362a19d
Rewrite message preview extraction
2015-12-16 13:45:38 +01:00
cketti
532aa76fce
Switch NotificationIds.getNewMailStackedNotificationId() to a 0-based index
2015-09-27 15:04:45 +02:00
cketti
75cdb7b498
Rename some variables/methods for better readability
2015-09-27 15:04:08 +02:00
cketti
5bbb7b7164
Rename NotificationsHolder to NotificationData
2015-09-24 22:08:04 +02:00
cketti
3e1b8639b1
Change the way notification IDs are generated
2015-09-24 21:38:10 +02:00
cketti
ca5f362080
Add tests for notification code and fix bugs found along the way
2015-09-15 20:28:59 +02:00
cketti
c4bbae288b
Hide the "Load up to X more" footer when there are no more relevant messages on the server
...
This is tricky for IMAP because we only care about non-deleted messages and
there's no easy way to count these. So when necessary we list all remaining
messages on the server to check whether any of them are relevant for us.
2015-09-06 21:06:18 +02:00
Art O Cathain
591785a3ab
fix up some dodgy nulls
2015-06-13 16:24:58 +01:00
cketti
a24d85d754
Move library tests to k9mail-library module
2015-05-21 02:21:38 +02:00
cketti
4b273c1749
Move some tests from 'androidTest' to 'test' folder
2015-05-20 21:00:43 +02:00
cketti
0f66cacf10
Move JVM tests into main k9mail module
...
Use Robolectric for the tests that use framework classes.
2015-05-20 21:00:43 +02:00