diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-28 21:54:29 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-28 21:54:29 -0400 |
commit | 3c828e24a950a7fa4d17e22b5afa37a4006126f0 (patch) | |
tree | dc762537097fd87f64e4133e6bbab98bb263bb37 /tests/AndroidTests/src/com/android | |
parent | 952402704a175ba27f6c89dff1ada634c5ce5626 (diff) | |
parent | 837cba33c59ea4bb622878f77fc262436e01ce2b (diff) | |
download | frameworks_base-3c828e24a950a7fa4d17e22b5afa37a4006126f0.zip frameworks_base-3c828e24a950a7fa4d17e22b5afa37a4006126f0.tar.gz frameworks_base-3c828e24a950a7fa4d17e22b5afa37a4006126f0.tar.bz2 |
Merge change I9195a354 into eclair-mr2
* changes:
Add partial support of Android-specific properties.
Diffstat (limited to 'tests/AndroidTests/src/com/android')
-rw-r--r-- | tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java index d0097c4..f1a46d6 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java +++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java @@ -643,9 +643,6 @@ public class VCardExporterTests extends AndroidTestCase { testStructuredNameUseSuperPrimaryCommon(V30); } - /** - * There's no property for nickname in vCard 2.1, so we don't have any requirement on it. - */ public void testNickNameV30() { ExportTestResolver resolver = new ExportTestResolver(); ContentValues contentValues = resolver.buildData(Nickname.CONTENT_ITEM_TYPE); @@ -1269,4 +1266,23 @@ public class VCardExporterTests extends AndroidTestCase { verifyOneComposition(resolver, handler, version); } + + /** + * There's no "NICKNAME" property in vCard 2.1, while there is in vCard 3.0. + * We use Android-specific "X-ANDROID-CUSTOM" property. + * This test verifies the functionality. + */ + public void testNickNameV21() { + ExportTestResolver resolver = new ExportTestResolver(); + ContentValues contentValues = resolver.buildData(Nickname.CONTENT_ITEM_TYPE); + contentValues.put(Nickname.NAME, "Nicky"); + + VCardVerificationHandler handler = new VCardVerificationHandler(this, V21); + handler.addNewVerifierWithEmptyName() + .addNodeWithOrder("X-ANDROID-CUSTOM", Nickname.CONTENT_ITEM_TYPE + ";Nicky"); + + // TODO: also test import part. + + verifyOneComposition(resolver, handler, V21); + } } |