use of com.fsck.k9.mail.ServerSettings in project k-9 by k9mail.
the class SmtpTransportUriTest method decodeUri_canDecodeAuthType.
@Test
public void decodeUri_canDecodeAuthType() {
String storeUri = "smtp://user:password:PLAIN@server:123456";
ServerSettings result = SmtpTransport.decodeUri(storeUri);
assertEquals(AuthType.PLAIN, result.authenticationType);
}
use of com.fsck.k9.mail.ServerSettings in project k-9 by k9mail.
the class SmtpTransportUriTest method decodeUri_canDecodeSSL.
@Test
public void decodeUri_canDecodeSSL() {
String storeUri = "smtp+ssl+://user:password:PLAIN@server:123456";
ServerSettings result = SmtpTransport.decodeUri(storeUri);
assertEquals(ConnectionSecurity.SSL_TLS_REQUIRED, result.connectionSecurity);
}
use of com.fsck.k9.mail.ServerSettings in project k-9 by k9mail.
the class SmtpTransportUriTest method decodeUri_canDecodeAuthType_withEmptyPassword.
@Test
public void decodeUri_canDecodeAuthType_withEmptyPassword() {
String storeUri = "smtp://user::PLAIN@server:123456";
ServerSettings result = SmtpTransport.decodeUri(storeUri);
assertEquals(AuthType.PLAIN, result.authenticationType);
}
use of com.fsck.k9.mail.ServerSettings in project k-9 by k9mail.
the class SmtpTransportUriTest method decodeUri_canDecodeHost.
@Test
public void decodeUri_canDecodeHost() {
String storeUri = "smtp://user:password:PLAIN@server:123456";
ServerSettings result = SmtpTransport.decodeUri(storeUri);
assertEquals("server", result.host);
}
use of com.fsck.k9.mail.ServerSettings in project k-9 by k9mail.
the class SmtpTransportUriTest method decodeUri_forUnknownSchema_throwsIllegalArgumentException.
@Test(expected = IllegalArgumentException.class)
public void decodeUri_forUnknownSchema_throwsIllegalArgumentException() {
String storeUri = "unknown://user:clientCert:EXTERNAL@server:123456";
ServerSettings result = SmtpTransport.decodeUri(storeUri);
}
Aggregations