-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bbcd51
commit 9fe7d2d
Showing
3 changed files
with
22 additions
and
27 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ void main() { | |
|
||
group('Serialization', () { | ||
test('Test ServerConfig', () async { | ||
final originalServerConfig = ServerConfig( | ||
const originalServerConfig = ServerConfig( | ||
type: ServerType.imap, | ||
hostname: 'imap.example.com', | ||
port: 993, | ||
|
@@ -37,7 +37,7 @@ void main() { | |
}); | ||
|
||
test('serialize account', () { | ||
final original = MailAccount( | ||
const original = MailAccount( | ||
email: '[email protected]', | ||
name: 'A name with "quotes"', | ||
outgoingClientDomain: 'outgoing.com', | ||
|
@@ -51,9 +51,8 @@ void main() { | |
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress, | ||
), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'secret'), | ||
serverCapabilities: [const Capability('IMAP4')], | ||
authentication: PlainAuthentication('[email protected]', 'secret'), | ||
serverCapabilities: [Capability('IMAP4')], | ||
pathSeparator: '/', | ||
), | ||
outgoing: MailServerConfig( | ||
|
@@ -65,11 +64,10 @@ void main() { | |
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress, | ||
), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'secret'), | ||
authentication: PlainAuthentication('[email protected]', 'secret'), | ||
), | ||
supportsPlusAliases: true, | ||
aliases: [const MailAddress('just tester', '[email protected]')], | ||
aliases: [MailAddress('just tester', '[email protected]')], | ||
); | ||
_compareAfterJsonSerialization(original); | ||
}); | ||
|
@@ -89,7 +87,7 @@ void main() { | |
name: 'A name with "quotes"', | ||
outgoingClientDomain: 'outgoing.com', | ||
incoming: MailServerConfig( | ||
serverConfig: ServerConfig( | ||
serverConfig: const ServerConfig( | ||
type: ServerType.imap, | ||
hostname: 'imap.domain.com', | ||
port: 993, | ||
|
@@ -106,7 +104,7 @@ void main() { | |
pathSeparator: '/', | ||
), | ||
outgoing: MailServerConfig( | ||
serverConfig: ServerConfig( | ||
serverConfig: const ServerConfig( | ||
type: ServerType.smtp, | ||
hostname: 'smtp.domain.com', | ||
port: 993, | ||
|
@@ -152,7 +150,7 @@ void main() { | |
|
||
test('serialize list of accounts', () { | ||
final accounts = [ | ||
MailAccount( | ||
const MailAccount( | ||
email: '[email protected]', | ||
name: 'A name with "quotes"', | ||
userName: 'Andrea Ghez', | ||
|
@@ -165,9 +163,8 @@ void main() { | |
socketType: SocketType.ssl, | ||
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'secret'), | ||
serverCapabilities: [const Capability('IMAP4')], | ||
authentication: PlainAuthentication('[email protected]', 'secret'), | ||
serverCapabilities: [Capability('IMAP4')], | ||
pathSeparator: '/', | ||
), | ||
outgoing: MailServerConfig( | ||
|
@@ -178,11 +175,10 @@ void main() { | |
socketType: SocketType.ssl, | ||
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'secret'), | ||
authentication: PlainAuthentication('[email protected]', 'secret'), | ||
), | ||
), | ||
MailAccount( | ||
const MailAccount( | ||
email: '[email protected]', | ||
name: 'my second account', | ||
userName: 'First Last', | ||
|
@@ -196,11 +192,8 @@ void main() { | |
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'verysecret'), | ||
serverCapabilities: [ | ||
const Capability('IMAP4'), | ||
const Capability('IDLE') | ||
], | ||
PlainAuthentication('[email protected]', 'verysecret'), | ||
serverCapabilities: [Capability('IMAP4'), Capability('IDLE')], | ||
pathSeparator: '/', | ||
), | ||
outgoing: MailServerConfig( | ||
|
@@ -212,7 +205,7 @@ void main() { | |
authentication: Authentication.plain, | ||
usernameType: UsernameType.emailAddress), | ||
authentication: | ||
const PlainAuthentication('[email protected]', 'topsecret'), | ||
PlainAuthentication('[email protected]', 'topsecret'), | ||
), | ||
), | ||
]; | ||
|
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