-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert
EmailId
to optional variable
- Loading branch information
Showing
11 changed files
with
45 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,13 +24,13 @@ void main() { | |
group('[Email/changes]', () { | ||
|
||
final expectMail1 = Email( | ||
EmailId(Id("a59d5ca0-258e-11ec-a759-2fef1ee78d9e")), | ||
id: EmailId(Id("a59d5ca0-258e-11ec-a759-2fef1ee78d9e")), | ||
mailboxIds: { MailboxId(Id('aba7e8d0-18d9-11eb-a677-2990b970028d')): true }, | ||
keywords: { KeyWordIdentifier.emailSeen: true} | ||
); | ||
|
||
final expectMail2 = Email( | ||
EmailId(Id("a59d5ca0-258e-11ec-a759-2fef1ee78d9e")), | ||
id: EmailId(Id("a59d5ca0-258e-11ec-a759-2fef1ee78d9e")), | ||
preview: "This event is about to begin test TimeTuesday 29 September 2020 06:00 - 06:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - User A <[email protected]> (Organizer) - <[email protected]> Resourcesnew directoryNotesaaaa *#", | ||
hasAttachment: false, | ||
size: UnsignedInt(24946), | ||
|
@@ -43,7 +43,7 @@ void main() { | |
); | ||
|
||
final expectMail3 = Email( | ||
EmailId(Id("54fa3000-2595-11ec-a759-2fef1ee78d9e")), | ||
id: EmailId(Id("54fa3000-2595-11ec-a759-2fef1ee78d9e")), | ||
preview: "This event is about to begin A - show datetime1 TimeTuesday 15 September 2020 07:03 - 07:33 Europe/Paris (See in Calendar)Location1 thai ha1 (See in Map)Attendees - User A <[email protected]> (Organizer) - Thanh Loan LE <[email protected]> - User C <u", | ||
hasAttachment: false, | ||
size: UnsignedInt(24857), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; | |
void main() { | ||
group('get list email test', () { | ||
final expectMail1 = Email( | ||
EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear QA,I attached image here", | ||
hasAttachment: false, | ||
subject: "test inline image", | ||
|
@@ -34,7 +34,7 @@ void main() { | |
); | ||
|
||
final expectMail2 = Email( | ||
EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: "This event is about to begin Noti check TimeFriday 23 October 2020 12:00 - 12:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - User A <[email protected]> (Organizer) - Lê Nguyễn <[email protected]> - User C <[email protected]", | ||
hasAttachment: false, | ||
subject: "Notification: Noti check", | ||
|
@@ -44,7 +44,7 @@ void main() { | |
); | ||
|
||
final expectMail3 = Email( | ||
EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: "This event is about to begin Recurrencr TimeWednesday 26 August 2020 05:30 - 06:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - [email protected] <[email protected]> (Organizer) - User A <[email protected]> Resourc", | ||
hasAttachment: false, | ||
subject: "Notification: Recurrencr", | ||
|
@@ -54,7 +54,7 @@ void main() { | |
); | ||
|
||
final expectMail4 = Email( | ||
EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
preview: "alo -- desktop signature", | ||
hasAttachment: true, | ||
subject: "test attachment", | ||
|
@@ -64,7 +64,7 @@ void main() { | |
); | ||
|
||
final expectMail5 = Email( | ||
EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear, test inline Thanks and BRs-- desktop signature", | ||
hasAttachment: false, | ||
subject: "test inline image", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ import 'package:jmap_dart_client/jmap/mail/email/query/query_email_method.dart'; | |
void main() { | ||
group('get list email test', () { | ||
final expectMail1 = Email( | ||
EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear QA,I attached image here", | ||
hasAttachment: false, | ||
subject: "test inline image", | ||
|
@@ -34,7 +34,7 @@ void main() { | |
receivedAt: UTCDate(DateTime.parse("2021-08-11T04:25:55Z"))); | ||
|
||
final expectMail2 = Email( | ||
EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: | ||
"This event is about to begin Noti check TimeFriday 23 October 2020 12:00 - 12:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - User A <[email protected]> (Organizer) - Lê Nguyễn <[email protected]> - User C <[email protected]", | ||
hasAttachment: false, | ||
|
@@ -44,7 +44,7 @@ void main() { | |
receivedAt: UTCDate(DateTime.parse("2021-08-11T04:00:59Z"))); | ||
|
||
final expectMail3 = Email( | ||
EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: | ||
"This event is about to begin Recurrencr TimeWednesday 26 August 2020 05:30 - 06:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - [email protected] <[email protected]> (Organizer) - User A <[email protected]> Resourc", | ||
hasAttachment: false, | ||
|
@@ -54,7 +54,7 @@ void main() { | |
receivedAt: UTCDate(DateTime.parse("2021-08-11T04:00:55Z"))); | ||
|
||
final expectMail4 = Email( | ||
EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
preview: "alo -- desktop signature", | ||
hasAttachment: true, | ||
subject: "test attachment", | ||
|
@@ -63,7 +63,7 @@ void main() { | |
receivedAt: UTCDate(DateTime.parse("2021-08-11T06:46:26Z"))); | ||
|
||
final expectMail5 = Email( | ||
EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear, test inline Thanks and BRs-- desktop signature", | ||
hasAttachment: false, | ||
subject: "test inline image", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,8 @@ import 'package:jmap_dart_client/jmap/mail/email/query/query_email_method.dart'; | |
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; | ||
|
||
void main() { | ||
final expectMail1 = Email(EmailId(Id("5baf2a10-3f4d-11eb-b3ca-69d8f333e2f2")), | ||
final expectMail1 = Email( | ||
id: EmailId(Id("5baf2a10-3f4d-11eb-b3ca-69d8f333e2f2")), | ||
preview: | ||
"DJ REPEAT:Ercot Sees 56,373 MW Summer Peak,2% Below '00 Peak DJ Ercot: New Units Will Boost Supply to 65,064 MW DJ Ercot: 21% Summer Reserve If Normal Weather DJ Ercot Summer -2: New 345-Kv Line To Relieve Congestion By Eileen O'Grady Of DOW JONES NEWSWIRE", | ||
hasAttachment: false, | ||
|
@@ -41,7 +42,8 @@ void main() { | |
"2020-12-16T03:18:24Z", | ||
))); | ||
|
||
final expectMail2 = Email(EmailId(Id("2ef049e0-3f5d-11eb-bf20-f1a8da6866c8")), | ||
final expectMail2 = Email( | ||
id: EmailId(Id("2ef049e0-3f5d-11eb-bf20-f1a8da6866c8")), | ||
preview: | ||
"---------------------- Forwarded by Lorna Brennan/ET&S/Enron on 12/18/2000 10:59 AM --------------------------- \"[email protected]\" <webmaster on 12/15/2000 06:15:19 PM To: cc: Subject: STRATOSPHERIC LEVELS -- CERA Monthly Briefing Title: Into the Stratos", | ||
hasAttachment: false, | ||
|
@@ -54,7 +56,8 @@ void main() { | |
"2020-12-16T05:11:41Z", | ||
))); | ||
|
||
final expectMail3 = Email(EmailId(Id("2ef049e0-3f5d-11eb-bf20-f1a8da6866c8")), | ||
final expectMail3 = Email( | ||
id: EmailId(Id("2ef049e0-3f5d-11eb-bf20-f1a8da6866c8")), | ||
preview: | ||
"---------------------- Forwarded by Lorna Brennan/ET&S/Enron on 12/18/2000 10:59 AM --------------------------- \"[email protected]\" <webmaster on 12/15/2000 06:15:19 PM To: cc: Subject: STRATOSPHERIC LEVELS -- CERA Monthly Briefing Title: Into the Stratos", | ||
hasAttachment: false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; | |
void main() { | ||
|
||
final expectMail1 = Email( | ||
EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("382312d0-fa5c-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear QA,I attached image here", | ||
hasAttachment: false, | ||
subject: "A", | ||
|
@@ -36,7 +36,7 @@ void main() { | |
); | ||
|
||
final expectMail2 = Email( | ||
EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("bc8a5320-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: "This event is about to begin Noti check TimeFriday 23 October 2020 12:00 - 12:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - User A <[email protected]> (Organizer) - Lê Nguyễn <[email protected]> - User C <[email protected]", | ||
hasAttachment: false, | ||
subject: "B", | ||
|
@@ -47,7 +47,7 @@ void main() { | |
); | ||
|
||
final expectMail3 = Email( | ||
EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("ba7e0860-fa58-11eb-b647-2fef1ee78d9e")), | ||
preview: "This event is about to begin Recurrencr TimeWednesday 26 August 2020 05:30 - 06:30 Europe/Paris (See in Calendar)Location1 thai ha (See in Map)Attendees - [email protected] <[email protected]> (Organizer) - User A <[email protected]> Resourc", | ||
hasAttachment: false, | ||
subject: "C", | ||
|
@@ -58,7 +58,7 @@ void main() { | |
); | ||
|
||
final expectMail4 = Email( | ||
EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("d9b3b880-fa6f-11eb-b647-2fef1ee78d9e")), | ||
preview: "alo -- desktop signature", | ||
hasAttachment: true, | ||
subject: "D", | ||
|
@@ -69,7 +69,7 @@ void main() { | |
); | ||
|
||
final expectMail5 = Email( | ||
EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
id: EmailId(Id("637f1ef0-fa5d-11eb-b647-2fef1ee78d9e")), | ||
preview: "Dear, test inline Thanks and BRs-- desktop signature", | ||
hasAttachment: false, | ||
subject: "E", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; | |
void main() { | ||
group('test to json set email submission method', () { | ||
final expectedCreated = Email( | ||
EmailId(Id('64469f10-8e15-11ec-984e-e3f8b83572b4')), | ||
id: EmailId(Id('64469f10-8e15-11ec-984e-e3f8b83572b4')), | ||
blobId: Id('64469f10-8e15-11ec-984e-e3f8b83572b4'), | ||
threadId: ThreadId(Id('64469f10-8e15-11ec-984e-e3f8b83572b4')), | ||
size: UnsignedInt(742) | ||
|
@@ -165,7 +165,7 @@ void main() { | |
final setEmailMethod = SetEmailMethod(AccountId(Id('3ce33c876a726662c627746eb9537a1d13c2338193ef27bd051a3ce5c0fe5b12'))) | ||
..addCreate(Id('dab1234'), | ||
Email( | ||
EmailId(Id('dab1234')), | ||
id: EmailId(Id('dab1234')), | ||
mailboxIds: {MailboxId(Id('5dfb3290-0a14-11ec-b57c-2fef1ee78d9e')): true}, | ||
subject: 'test send email', | ||
from: {EmailAddress("userB", '[email protected]')}, | ||
|
@@ -354,7 +354,7 @@ void main() { | |
final setEmailMethod = SetEmailMethod(AccountId(Id('3ce33c876a726662c627746eb9537a1d13c2338193ef27bd051a3ce5c0fe5b12'))) | ||
..addCreate(Id('dab1234'), | ||
Email( | ||
EmailId(Id('dab1234')), | ||
id: EmailId(Id('dab1234')), | ||
mailboxIds: {MailboxId(Id('5dfb3290-0a14-11ec-b57c-2fef1ee78d9e')): true}, | ||
subject: 'test send email', | ||
from: {EmailAddress("userB", '[email protected]')}, | ||
|