summaryrefslogtreecommitdiffstats
path: root/tests/AndroidTests/src/com/android
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-28 21:54:29 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-28 21:54:29 -0400
commit3c828e24a950a7fa4d17e22b5afa37a4006126f0 (patch)
treedc762537097fd87f64e4133e6bbab98bb263bb37 /tests/AndroidTests/src/com/android
parent952402704a175ba27f6c89dff1ada634c5ce5626 (diff)
parent837cba33c59ea4bb622878f77fc262436e01ce2b (diff)
downloadframeworks_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.java22
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);
+ }
}