|
6 | 6 |
|
7 | 7 | package at.bitfire.vcard4android |
8 | 8 |
|
9 | | -import at.bitfire.vcard4android.property.* |
| 9 | +import at.bitfire.vcard4android.property.CustomType |
| 10 | +import at.bitfire.vcard4android.property.XAbDate |
| 11 | +import at.bitfire.vcard4android.property.XAbLabel |
| 12 | +import at.bitfire.vcard4android.property.XAbRelatedNames |
| 13 | +import at.bitfire.vcard4android.property.XAddressBookServerKind |
| 14 | +import at.bitfire.vcard4android.property.XPhoneticFirstName |
| 15 | +import at.bitfire.vcard4android.property.XPhoneticLastName |
| 16 | +import at.bitfire.vcard4android.property.XPhoneticMiddleName |
| 17 | +import at.bitfire.vcard4android.property.XSip |
10 | 18 | import ezvcard.VCard |
11 | 19 | import ezvcard.VCardVersion |
12 | 20 | import ezvcard.parameter.ImageType |
13 | 21 | import ezvcard.parameter.RelatedType |
14 | 22 | import ezvcard.parameter.SoundType |
15 | | -import ezvcard.property.* |
| 23 | +import ezvcard.property.Address |
| 24 | +import ezvcard.property.Anniversary |
| 25 | +import ezvcard.property.Birthday |
| 26 | +import ezvcard.property.Categories |
| 27 | +import ezvcard.property.FormattedName |
| 28 | +import ezvcard.property.Impp |
| 29 | +import ezvcard.property.Kind |
| 30 | +import ezvcard.property.Label |
| 31 | +import ezvcard.property.Logo |
| 32 | +import ezvcard.property.Member |
| 33 | +import ezvcard.property.Nickname |
| 34 | +import ezvcard.property.Organization |
| 35 | +import ezvcard.property.Photo |
| 36 | +import ezvcard.property.ProductId |
| 37 | +import ezvcard.property.RawProperty |
| 38 | +import ezvcard.property.Related |
| 39 | +import ezvcard.property.Revision |
| 40 | +import ezvcard.property.SortString |
| 41 | +import ezvcard.property.Sound |
| 42 | +import ezvcard.property.StructuredName |
| 43 | +import ezvcard.property.Telephone |
| 44 | +import ezvcard.property.Uid |
| 45 | +import ezvcard.property.Url |
16 | 46 | import ezvcard.util.PartialDate |
17 | | -import org.junit.Assert.* |
| 47 | +import ezvcard.util.TelUri |
| 48 | +import org.junit.Assert.assertArrayEquals |
| 49 | +import org.junit.Assert.assertEquals |
| 50 | +import org.junit.Assert.assertFalse |
| 51 | +import org.junit.Assert.assertNull |
| 52 | +import org.junit.Assert.assertTrue |
18 | 53 | import org.junit.Test |
19 | 54 | import java.net.URI |
20 | 55 | import java.time.LocalDate |
@@ -366,9 +401,13 @@ class ContactReaderTest { |
366 | 401 | @Test |
367 | 402 | fun testTelephone() { |
368 | 403 | val c = ContactReader.fromVCard(VCard().apply { |
| 404 | + // number of type TEXT |
369 | 405 | addTelephoneNumber("+1 555 12345") |
| 406 | + // number of type URI |
| 407 | + addTelephoneNumber(Telephone(TelUri.parse("tel:123"))) |
370 | 408 | }) |
371 | | - assertEquals("+1 555 12345", c.phoneNumbers.first.property.text) |
| 409 | + assertEquals("+1 555 12345", c.phoneNumbers[0].property.text) |
| 410 | + assertEquals("123", c.phoneNumbers[1].property.uri.number) |
372 | 411 | } |
373 | 412 |
|
374 | 413 |
|
|
0 commit comments