Search in sources :

Example 11 with Address

use of com.fsck.k9.mail.Address in project k-9 by k9mail.

the class ContactPictureLoaderTest method calcUnknownContactLetter_ignoresSpace.

@Test
public void calcUnknownContactLetter_ignoresSpace() {
    Address address = new Address(" abcd <a@b.com>");
    String result = ContactPictureLoader.calcUnknownContactLetter(address);
    assertEquals("A", result);
}
Also used : Address(com.fsck.k9.mail.Address) Test(org.junit.Test)

Example 12 with Address

use of com.fsck.k9.mail.Address in project k-9 by k9mail.

the class ContactPictureLoaderTest method calcUnknownContactLetter_withAsciiName.

@Test
public void calcUnknownContactLetter_withAsciiName() {
    Address address = new Address("abcd <a@b.com>");
    String result = ContactPictureLoader.calcUnknownContactLetter(address);
    assertEquals("A", result);
}
Also used : Address(com.fsck.k9.mail.Address) Test(org.junit.Test)

Example 13 with Address

use of com.fsck.k9.mail.Address in project k-9 by k9mail.

the class ContactPictureLoaderTest method calcUnknownContactLetter_withSurrogatePair.

@Test
public void calcUnknownContactLetter_withSurrogatePair() {
    Address address = new Address("𐎵 <a@b.com>");
    String result = ContactPictureLoader.calcUnknownContactLetter(address);
    assertEquals("𐎵", result);
}
Also used : Address(com.fsck.k9.mail.Address) Test(org.junit.Test)

Example 14 with Address

use of com.fsck.k9.mail.Address in project k-9 by k9mail.

the class ContactPictureLoaderTest method calcUnknownContactLetter_withLstroke.

@Test
public void calcUnknownContactLetter_withLstroke() {
    Address address = new Address("Łatynka <a@b.com>");
    String result = ContactPictureLoader.calcUnknownContactLetter(address);
    assertEquals("Ł", result);
}
Also used : Address(com.fsck.k9.mail.Address) Test(org.junit.Test)

Example 15 with Address

use of com.fsck.k9.mail.Address in project k-9 by k9mail.

the class ContactPictureLoaderTest method calcUnknownContactLetter_ignoresMatchEmoji.

@Test
public void calcUnknownContactLetter_ignoresMatchEmoji() {
    Address address = new Address("😀 <a@b.com>");
    String result = ContactPictureLoader.calcUnknownContactLetter(address);
    assertEquals("?", result);
}
Also used : Address(com.fsck.k9.mail.Address) Test(org.junit.Test)

Aggregations

Address (com.fsck.k9.mail.Address)72 Test (org.junit.Test)40 Uri (android.net.Uri)13 RobolectricTest (com.fsck.k9.RobolectricTest)12 Message (com.fsck.k9.mail.Message)10 Date (java.util.Date)8 MimeMessage (com.fsck.k9.mail.internet.MimeMessage)7 ArrayList (java.util.ArrayList)7 MessagingException (com.fsck.k9.mail.MessagingException)6 Contacts (com.fsck.k9.helper.Contacts)5 Recipient (com.fsck.k9.view.RecipientSelectView.Recipient)5 AddressStyle (com.zegoggles.smssync.preferences.AddressStyle)5 IOException (java.io.IOException)5 Intent (android.content.Intent)4 Cursor (android.database.Cursor)4 MatrixCursor (android.database.MatrixCursor)4 AuthenticationFailedException (com.fsck.k9.mail.AuthenticationFailedException)4 CertificateValidationException (com.fsck.k9.mail.CertificateValidationException)4 TextBody (com.fsck.k9.mail.internet.TextBody)4 SpannableString (android.text.SpannableString)3