public void testSimpleV21() {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "Ando");
- contentValues.put(StructuredName.GIVEN_NAME, "Roid");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "Ando")
+ .put(StructuredName.GIVEN_NAME, "Roid");
VCardVerificationHandler handler = new VCardVerificationHandler(this, V21);
- handler.addNewVerifier()
- .addNodeWithoutOrder("FN", "Roid Ando")
- .addNodeWithoutOrder("N", "Ando;Roid;;;", Arrays.asList("Ando", "Roid", "", "", ""));
+ handler.addPropertyNodesVerifier()
+ .addNodeWithoutOrder("FN", "Roid Ando")
+ .addNodeWithoutOrder("N", "Ando;Roid;;;", Arrays.asList("Ando", "Roid", "", "", ""));
verifyOneComposition(resolver, handler, V21);
}
final boolean isV30 = (version == V30);
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "AppropriateFamilyName");
- contentValues.put(StructuredName.GIVEN_NAME, "AppropriateGivenName");
- contentValues.put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName");
- contentValues.put(StructuredName.PREFIX, "AppropriatePrefix");
- contentValues.put(StructuredName.SUFFIX, "AppropriateSuffix");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
+ .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
+ .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
+ .put(StructuredName.PREFIX, "AppropriatePrefix")
+ .put(StructuredName.SUFFIX, "AppropriateSuffix")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- PropertyNodesVerifier verifier = handler.addNewVerifier()
- .addNodeWithOrder("N",
- "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
- + "AppropriatePrefix;AppropriateSuffix",
- Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
- "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
- .addNodeWithOrder("FN",
- "AppropriatePrefix AppropriateGivenName "
- + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
- .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
- .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
- .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
+ PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+ .addNodeWithOrder("N",
+ "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
+ + "AppropriatePrefix;AppropriateSuffix",
+ Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
+ "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
+ .addNodeWithOrder("FN",
+ "AppropriatePrefix AppropriateGivenName "
+ + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
+ .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
+ .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
+ .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
if (isV30) {
verifier.addNodeWithoutOrder("SORT-STRING",
final boolean isV30 = (version == V30);
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1");
- contentValues.put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1");
- contentValues.put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1");
- contentValues.put(StructuredName.PREFIX, "DoNotEmitPrefix1");
- contentValues.put(StructuredName.SUFFIX, "DoNotEmitSuffix1");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily1");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven1");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1")
+ .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1")
+ .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1")
+ .put(StructuredName.PREFIX, "DoNotEmitPrefix1")
+ .put(StructuredName.SUFFIX, "DoNotEmitSuffix1")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily1")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven1")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
// With "IS_PRIMARY=1". This is what we should use.
- contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "AppropriateFamilyName");
- contentValues.put(StructuredName.GIVEN_NAME, "AppropriateGivenName");
- contentValues.put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName");
- contentValues.put(StructuredName.PREFIX, "AppropriatePrefix");
- contentValues.put(StructuredName.SUFFIX, "AppropriateSuffix");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle");
- contentValues.put(StructuredName.IS_PRIMARY, 1);
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
+ .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
+ .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
+ .put(StructuredName.PREFIX, "AppropriatePrefix")
+ .put(StructuredName.SUFFIX, "AppropriateSuffix")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle")
+ .put(StructuredName.IS_PRIMARY, 1);
// With "IS_PRIMARY=1", but we should ignore this time, since this is second, not first.
- contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2");
- contentValues.put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2");
- contentValues.put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2");
- contentValues.put(StructuredName.PREFIX, "DoNotEmitPrefix2");
- contentValues.put(StructuredName.SUFFIX, "DoNotEmitSuffix2");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily2");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven2");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle2");
- contentValues.put(StructuredName.IS_PRIMARY, 1);
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2")
+ .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2")
+ .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2")
+ .put(StructuredName.PREFIX, "DoNotEmitPrefix2")
+ .put(StructuredName.SUFFIX, "DoNotEmitSuffix2")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily2")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven2")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle2")
+ .put(StructuredName.IS_PRIMARY, 1);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- PropertyNodesVerifier verifier = handler.addNewVerifier()
- .addNodeWithOrder("N",
- "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
- + "AppropriatePrefix;AppropriateSuffix",
- Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
- "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
- .addNodeWithOrder("FN",
- "AppropriatePrefix AppropriateGivenName "
- + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
- .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
- .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
- .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
+ PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+ .addNodeWithOrder("N",
+ "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
+ + "AppropriatePrefix;AppropriateSuffix",
+ Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
+ "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
+ .addNodeWithOrder("FN",
+ "AppropriatePrefix AppropriateGivenName "
+ + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
+ .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
+ .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
+ .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
if (isV30) {
verifier.addNodeWithoutOrder("SORT-STRING",
final boolean isV30 = (version == V30);
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1");
- contentValues.put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1");
- contentValues.put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1");
- contentValues.put(StructuredName.PREFIX, "DoNotEmitPrefix1");
- contentValues.put(StructuredName.SUFFIX, "DoNotEmitSuffix1");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily1");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven1");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1")
+ .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1")
+ .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1")
+ .put(StructuredName.PREFIX, "DoNotEmitPrefix1")
+ .put(StructuredName.SUFFIX, "DoNotEmitSuffix1")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily1")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven1")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
// With "IS_PRIMARY=1", but we should ignore this time.
- contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2");
- contentValues.put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2");
- contentValues.put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2");
- contentValues.put(StructuredName.PREFIX, "DoNotEmitPrefix2");
- contentValues.put(StructuredName.SUFFIX, "DoNotEmitSuffix2");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily2");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven2");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle2");
- contentValues.put(StructuredName.IS_PRIMARY, 1);
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2")
+ .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2")
+ .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2")
+ .put(StructuredName.PREFIX, "DoNotEmitPrefix2")
+ .put(StructuredName.SUFFIX, "DoNotEmitSuffix2")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily2")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven2")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle2")
+ .put(StructuredName.IS_PRIMARY, 1);
// With "IS_SUPER_PRIMARY=1". This is what we should use.
- contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "AppropriateFamilyName");
- contentValues.put(StructuredName.GIVEN_NAME, "AppropriateGivenName");
- contentValues.put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName");
- contentValues.put(StructuredName.PREFIX, "AppropriatePrefix");
- contentValues.put(StructuredName.SUFFIX, "AppropriateSuffix");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle");
- contentValues.put(StructuredName.IS_SUPER_PRIMARY, 1);
-
- contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName3");
- contentValues.put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName3");
- contentValues.put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName3");
- contentValues.put(StructuredName.PREFIX, "DoNotEmitPrefix3");
- contentValues.put(StructuredName.SUFFIX, "DoNotEmitSuffix3");
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily3");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven3");
- contentValues.put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle3");
- contentValues.put(StructuredName.IS_PRIMARY, 1);
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
+ .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
+ .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
+ .put(StructuredName.PREFIX, "AppropriatePrefix")
+ .put(StructuredName.SUFFIX, "AppropriateSuffix")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "AppropriatePhoneticFamily")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle")
+ .put(StructuredName.IS_SUPER_PRIMARY, 1);
+
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName3")
+ .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName3")
+ .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName3")
+ .put(StructuredName.PREFIX, "DoNotEmitPrefix3")
+ .put(StructuredName.SUFFIX, "DoNotEmitSuffix3")
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "DoNotEmitPhoneticFamily3")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "DoNotEmitPhoneticGiven3")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle3")
+ .put(StructuredName.IS_PRIMARY, 1);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- PropertyNodesVerifier verifier = handler.addNewVerifier()
- .addNodeWithOrder("N",
- "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
- + "AppropriatePrefix;AppropriateSuffix",
- Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
- "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
- .addNodeWithOrder("FN",
- "AppropriatePrefix AppropriateGivenName "
- + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
- .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
- .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
- .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
+ PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+ .addNodeWithOrder("N",
+ "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
+ + "AppropriatePrefix;AppropriateSuffix",
+ Arrays.asList("AppropriateFamilyName", "AppropriateGivenName",
+ "AppropriateMiddleName", "AppropriatePrefix", "AppropriateSuffix"))
+ .addNodeWithOrder("FN",
+ "AppropriatePrefix AppropriateGivenName "
+ + "AppropriateMiddleName AppropriateFamilyName AppropriateSuffix")
+ .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "AppropriatePhoneticGiven")
+ .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME", "AppropriatePhoneticMiddle")
+ .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
if (isV30) {
verifier.addNodeWithoutOrder("SORT-STRING",
public void testNickNameV30() {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Nickname.CONTENT_ITEM_TYPE);
- contentValues.put(Nickname.NAME, "Nicky");
+ resolver.buildInput(Nickname.CONTENT_ITEM_TYPE)
+ .put(Nickname.NAME, "Nicky");
VCardVerificationHandler handler = new VCardVerificationHandler(this, V30);
- handler.addNewVerifierWithEmptyName()
+ handler.addPropertyVerifierWithEmptyName()
.addNodeWithOrder("NICKNAME", "Nicky");
verifyOneComposition(resolver, handler, V30);
private void testPhoneBasicCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "1");
- contentValues.put(Phone.TYPE, Phone.TYPE_HOME);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "1")
+ .put(Phone.TYPE, Phone.TYPE_HOME);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
verifyOneComposition(resolver, handler, version);
}
private void testPhoneVariousTypeSupport(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "10");
- contentValues.put(Phone.TYPE, Phone.TYPE_HOME);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "10")
+ .put(Phone.TYPE, Phone.TYPE_HOME);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "20");
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "20")
+ .put(Phone.TYPE, Phone.TYPE_WORK);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "30");
- contentValues.put(Phone.TYPE, Phone.TYPE_FAX_HOME);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "30")
+ .put(Phone.TYPE, Phone.TYPE_FAX_HOME);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "40");
- contentValues.put(Phone.TYPE, Phone.TYPE_FAX_WORK);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "40")
+ .put(Phone.TYPE, Phone.TYPE_FAX_WORK);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "50");
- contentValues.put(Phone.TYPE, Phone.TYPE_MOBILE);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "50")
+ .put(Phone.TYPE, Phone.TYPE_MOBILE);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "60");
- contentValues.put(Phone.TYPE, Phone.TYPE_PAGER);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "60")
+ .put(Phone.TYPE, Phone.TYPE_PAGER);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "70");
- contentValues.put(Phone.TYPE, Phone.TYPE_OTHER);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "70")
+ .put(Phone.TYPE, Phone.TYPE_OTHER);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "80");
- contentValues.put(Phone.TYPE, Phone.TYPE_CAR);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "80")
+ .put(Phone.TYPE, Phone.TYPE_CAR);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "90");
- contentValues.put(Phone.TYPE, Phone.TYPE_COMPANY_MAIN);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "90")
+ .put(Phone.TYPE, Phone.TYPE_COMPANY_MAIN);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "100");
- contentValues.put(Phone.TYPE, Phone.TYPE_ISDN);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "100")
+ .put(Phone.TYPE, Phone.TYPE_ISDN);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "110");
- contentValues.put(Phone.TYPE, Phone.TYPE_MAIN);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "110")
+ .put(Phone.TYPE, Phone.TYPE_MAIN);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "120");
- contentValues.put(Phone.TYPE, Phone.TYPE_OTHER_FAX);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "120")
+ .put(Phone.TYPE, Phone.TYPE_OTHER_FAX);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "130");
- contentValues.put(Phone.TYPE, Phone.TYPE_TELEX);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "130")
+ .put(Phone.TYPE, Phone.TYPE_TELEX);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "140");
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK_MOBILE);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "140")
+ .put(Phone.TYPE, Phone.TYPE_WORK_MOBILE);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "150");
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK_PAGER);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "150")
+ .put(Phone.TYPE, Phone.TYPE_WORK_PAGER);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "160");
- contentValues.put(Phone.TYPE, Phone.TYPE_MMS);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "160")
+ .put(Phone.TYPE, Phone.TYPE_MMS);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("TEL", "10", new TypeSet("HOME"))
- .addNodeWithoutOrder("TEL", "20", new TypeSet("WORK"))
- .addNodeWithoutOrder("TEL", "30", new TypeSet("HOME", "FAX"))
- .addNodeWithoutOrder("TEL", "40", new TypeSet("WORK", "FAX"))
- .addNodeWithoutOrder("TEL", "50", new TypeSet("CELL"))
- .addNodeWithoutOrder("TEL", "60", new TypeSet("PAGER"))
- .addNodeWithoutOrder("TEL", "70", new TypeSet("VOICE"))
- .addNodeWithoutOrder("TEL", "80", new TypeSet("CAR"))
- .addNodeWithoutOrder("TEL", "90", new TypeSet("WORK", "PREF"))
- .addNodeWithoutOrder("TEL", "100", new TypeSet("ISDN"))
- .addNodeWithoutOrder("TEL", "110", new TypeSet("PREF"))
- .addNodeWithoutOrder("TEL", "120", new TypeSet("FAX"))
- .addNodeWithoutOrder("TEL", "130", new TypeSet("TLX"))
- .addNodeWithoutOrder("TEL", "140", new TypeSet("WORK", "MOBILE"))
- .addNodeWithoutOrder("TEL", "150", new TypeSet("WORK", "PAGER"))
- .addNodeWithoutOrder("TEL", "160", new TypeSet("MSG"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("TEL", "10", new TypeSet("HOME"))
+ .addNodeWithoutOrder("TEL", "20", new TypeSet("WORK"))
+ .addNodeWithoutOrder("TEL", "30", new TypeSet("HOME", "FAX"))
+ .addNodeWithoutOrder("TEL", "40", new TypeSet("WORK", "FAX"))
+ .addNodeWithoutOrder("TEL", "50", new TypeSet("CELL"))
+ .addNodeWithoutOrder("TEL", "60", new TypeSet("PAGER"))
+ .addNodeWithoutOrder("TEL", "70", new TypeSet("VOICE"))
+ .addNodeWithoutOrder("TEL", "80", new TypeSet("CAR"))
+ .addNodeWithoutOrder("TEL", "90", new TypeSet("WORK", "PREF"))
+ .addNodeWithoutOrder("TEL", "100", new TypeSet("ISDN"))
+ .addNodeWithoutOrder("TEL", "110", new TypeSet("PREF"))
+ .addNodeWithoutOrder("TEL", "120", new TypeSet("FAX"))
+ .addNodeWithoutOrder("TEL", "130", new TypeSet("TLX"))
+ .addNodeWithoutOrder("TEL", "140", new TypeSet("WORK", "MOBILE"))
+ .addNodeWithoutOrder("TEL", "150", new TypeSet("WORK", "PAGER"))
+ .addNodeWithoutOrder("TEL", "160", new TypeSet("MSG"));
}
public void testPhoneVariousTypeSupportV21() {
private void testPhonePrefHandlingCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "1");
- contentValues.put(Phone.TYPE, Phone.TYPE_HOME);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "1")
+ .put(Phone.TYPE, Phone.TYPE_HOME);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "2");
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK);
- contentValues.put(Phone.IS_PRIMARY, 1);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "2")
+ .put(Phone.TYPE, Phone.TYPE_WORK)
+ .put(Phone.IS_PRIMARY, 1);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "3");
- contentValues.put(Phone.TYPE, Phone.TYPE_FAX_HOME);
- contentValues.put(Phone.IS_PRIMARY, 1);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "3")
+ .put(Phone.TYPE, Phone.TYPE_FAX_HOME)
+ .put(Phone.IS_PRIMARY, 1);
- contentValues = resolver.buildData(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "4");
- contentValues.put(Phone.TYPE, Phone.TYPE_FAX_WORK);
+ resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "4")
+ .put(Phone.TYPE, Phone.TYPE_FAX_WORK);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("TEL", "4", new TypeSet("WORK", "FAX"))
- .addNodeWithoutOrder("TEL", "3", new TypeSet("HOME", "FAX", "PREF"))
- .addNodeWithoutOrder("TEL", "2", new TypeSet("WORK", "VOICE", "PREF"))
- .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("TEL", "4", new TypeSet("WORK", "FAX"))
+ .addNodeWithoutOrder("TEL", "3", new TypeSet("HOME", "FAX", "PREF"))
+ .addNodeWithoutOrder("TEL", "2", new TypeSet("WORK", "VOICE", "PREF"))
+ .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
verifyOneComposition(resolver, handler, version);
}
private void testEmailBasicCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "sample@example.com");
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "sample@example.com");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
+ handler.addPropertyVerifierWithEmptyName()
.addNodeWithoutOrder("EMAIL", "sample@example.com");
verifyOneComposition(resolver, handler, version);
private void testEmailVariousTypeSupportCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_home@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_HOME);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_home@example.com")
+ .put(Email.TYPE, Email.TYPE_HOME);
- contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_work@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_WORK);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_work@example.com")
+ .put(Email.TYPE, Email.TYPE_WORK);
- contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_mobile@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_MOBILE);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_mobile@example.com")
+ .put(Email.TYPE, Email.TYPE_MOBILE);
- contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_other@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_OTHER);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_other@example.com")
+ .put(Email.TYPE, Email.TYPE_OTHER);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME"))
- .addNodeWithoutOrder("EMAIL", "type_work@example.com", new TypeSet("WORK"))
- .addNodeWithoutOrder("EMAIL", "type_mobile@example.com", new TypeSet("CELL"))
- .addNodeWithoutOrder("EMAIL", "type_other@example.com");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME"))
+ .addNodeWithoutOrder("EMAIL", "type_work@example.com", new TypeSet("WORK"))
+ .addNodeWithoutOrder("EMAIL", "type_mobile@example.com", new TypeSet("CELL"))
+ .addNodeWithoutOrder("EMAIL", "type_other@example.com");
verifyOneComposition(resolver, handler, version);
}
private void testEmailPrefHandlingCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_home@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_HOME);
- contentValues.put(Email.IS_PRIMARY, 1);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_home@example.com")
+ .put(Email.TYPE, Email.TYPE_HOME)
+ .put(Email.IS_PRIMARY, 1);
- contentValues = resolver.buildData(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "type_notype@example.com");
- contentValues.put(Email.IS_PRIMARY, 1);
+ resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "type_notype@example.com")
+ .put(Email.IS_PRIMARY, 1);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("EMAIL", "type_notype@example.com", new TypeSet("PREF"))
- .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME", "PREF"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("EMAIL", "type_notype@example.com", new TypeSet("PREF"))
+ .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME", "PREF"));
verifyOneComposition(resolver, handler, version);
}
// adr-value = 0*6(text-value ";") text-value
// ; PO Box, Extended Address, Street, Locality, Region, Postal Code,
// ; Country Name
- ContentValues contentValues = resolver.buildData(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.POBOX, "Pobox");
- contentValues.put(StructuredPostal.NEIGHBORHOOD, "Neighborhood");
- contentValues.put(StructuredPostal.STREET, "Street");
- contentValues.put(StructuredPostal.CITY, "City");
- contentValues.put(StructuredPostal.REGION, "Region");
- contentValues.put(StructuredPostal.POSTCODE, "100");
- contentValues.put(StructuredPostal.COUNTRY, "Country");
+ resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.POBOX, "Pobox")
+ .put(StructuredPostal.NEIGHBORHOOD, "Neighborhood")
+ .put(StructuredPostal.STREET, "Street")
+ .put(StructuredPostal.CITY, "City")
+ .put(StructuredPostal.REGION, "Region")
+ .put(StructuredPostal.POSTCODE, "100")
+ .put(StructuredPostal.COUNTRY, "Country");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("ADR", "Pobox;Neighborhood;Street;City;Region;100;Country",
- Arrays.asList("Pobox", "Neighborhood", "Street", "City",
- "Region", "100", "Country"), new TypeSet("HOME"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("ADR", "Pobox;Neighborhood;Street;City;Region;100;Country",
+ Arrays.asList("Pobox", "Neighborhood", "Street", "City",
+ "Region", "100", "Country"), new TypeSet("HOME"));
verifyOneComposition(resolver, handler, version);
}
private void testPostalOnlyWithFormattedAddressCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.FORMATTED_ADDRESS,
+ resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.FORMATTED_ADDRESS,
"Formatted address CA 123-334 United Statue");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithOrder("ADR", ";Formatted address CA 123-334 United Statue;;;;;",
- Arrays.asList("", "Formatted address CA 123-334 United Statue",
- "", "", "", "", ""), new TypeSet("HOME"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithOrder("ADR", ";Formatted address CA 123-334 United Statue;;;;;",
+ Arrays.asList("", "Formatted address CA 123-334 United Statue",
+ "", "", "", "", ""), new TypeSet("HOME"));
verifyOneComposition(resolver, handler, version);
}
private void testPostalWithBothStructuredAndFormattedCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.POBOX, "Pobox");
- contentValues.put(StructuredPostal.COUNTRY, "Country");
- contentValues.put(StructuredPostal.FORMATTED_ADDRESS,
- "Formatted address CA 123-334 United Statue"); // Should be ignored
+ resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.POBOX, "Pobox")
+ .put(StructuredPostal.COUNTRY, "Country")
+ .put(StructuredPostal.FORMATTED_ADDRESS,
+ "Formatted address CA 123-334 United Statue"); // Should be ignored
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("ADR", "Pobox;;;;;;Country",
- Arrays.asList("Pobox", "", "", "", "", "", "Country"), new TypeSet("HOME"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("ADR", "Pobox;;;;;;Country",
+ Arrays.asList("Pobox", "", "", "", "", "", "Country"),
+ new TypeSet("HOME"));
verifyOneComposition(resolver, handler, version);
}
private void testOrganizationCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "CompanyX");
- contentValues.put(Organization.DEPARTMENT, "DepartmentY");
- contentValues.put(Organization.TITLE, "TitleZ");
- contentValues.put(Organization.JOB_DESCRIPTION, "Description Rambda"); // Ignored.
- contentValues.put(Organization.OFFICE_LOCATION, "Mountain View"); // Ignored.
- contentValues.put(Organization.PHONETIC_NAME, "PhoneticName!"); // Ignored
- contentValues.put(Organization.SYMBOL, "(^o^)/~~"); // Ignore him (her).
-
- contentValues = resolver.buildData(Organization.CONTENT_ITEM_TYPE);
- contentValues.putNull(Organization.COMPANY);
- contentValues.put(Organization.DEPARTMENT, "DepartmentXX");
- contentValues.putNull(Organization.TITLE);
-
- contentValues = resolver.buildData(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "CompanyXYZ");
- contentValues.putNull(Organization.DEPARTMENT);
- contentValues.put(Organization.TITLE, "TitleXYZYX");
+ resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "CompanyX")
+ .put(Organization.DEPARTMENT, "DepartmentY")
+ .put(Organization.TITLE, "TitleZ")
+ .put(Organization.JOB_DESCRIPTION, "Description Rambda") // Ignored.
+ .put(Organization.OFFICE_LOCATION, "Mountain View") // Ignored.
+ .put(Organization.PHONETIC_NAME, "PhoneticName!") // Ignored
+ .put(Organization.SYMBOL, "(^o^)/~~"); // Ignore him (her).
+
+ resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+ .putNull(Organization.COMPANY)
+ .put(Organization.DEPARTMENT, "DepartmentXX")
+ .putNull(Organization.TITLE);
+
+ resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "CompanyXYZ")
+ .putNull(Organization.DEPARTMENT)
+ .put(Organization.TITLE, "TitleXYZYX");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
// Currently we do not use group but depend on the order.
- handler.addNewVerifierWithEmptyName()
- .addNodeWithOrder("ORG", "CompanyX;DepartmentY",
- Arrays.asList("CompanyX", "DepartmentY"))
- .addNodeWithOrder("TITLE", "TitleZ")
- .addNodeWithOrder("ORG", "DepartmentXX")
- .addNodeWithOrder("ORG", "CompanyXYZ")
- .addNodeWithOrder("TITLE", "TitleXYZYX");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithOrder("ORG", "CompanyX;DepartmentY",
+ Arrays.asList("CompanyX", "DepartmentY"))
+ .addNodeWithOrder("TITLE", "TitleZ")
+ .addNodeWithOrder("ORG", "DepartmentXX")
+ .addNodeWithOrder("ORG", "CompanyXYZ")
+ .addNodeWithOrder("TITLE", "TitleXYZYX");
verifyOneComposition(resolver, handler, version);
}
private void testImVariousTypeSupportCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_AIM);
- contentValues.put(Im.DATA, "aim");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
+ .put(Im.DATA, "aim");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_MSN);
- contentValues.put(Im.DATA, "msn");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_MSN)
+ .put(Im.DATA, "msn");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_YAHOO);
- contentValues.put(Im.DATA, "yahoo");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_YAHOO)
+ .put(Im.DATA, "yahoo");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_SKYPE);
- contentValues.put(Im.DATA, "skype");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_SKYPE)
+ .put(Im.DATA, "skype");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_QQ);
- contentValues.put(Im.DATA, "qq");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_QQ)
+ .put(Im.DATA, "qq");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK);
- contentValues.put(Im.DATA, "google talk");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK)
+ .put(Im.DATA, "google talk");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_ICQ);
- contentValues.put(Im.DATA, "icq");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_ICQ)
+ .put(Im.DATA, "icq");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_JABBER);
- contentValues.put(Im.DATA, "jabber");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_JABBER)
+ .put(Im.DATA, "jabber");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_NETMEETING);
- contentValues.put(Im.DATA, "netmeeting");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_NETMEETING)
+ .put(Im.DATA, "netmeeting");
// No determined way to express unknown type...
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("X-JABBER", "jabber")
- .addNodeWithoutOrder("X-ICQ", "icq")
- .addNodeWithoutOrder("X-GOOGLE-TALK", "google talk")
- .addNodeWithoutOrder("X-QQ", "qq")
- .addNodeWithoutOrder("X-SKYPE-USERNAME", "skype")
- .addNodeWithoutOrder("X-YAHOO", "yahoo")
- .addNodeWithoutOrder("X-MSN", "msn")
- .addNodeWithoutOrder("X-NETMEETING", "netmeeting")
- .addNodeWithoutOrder("X-AIM", "aim");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("X-JABBER", "jabber")
+ .addNodeWithoutOrder("X-ICQ", "icq")
+ .addNodeWithoutOrder("X-GOOGLE-TALK", "google talk")
+ .addNodeWithoutOrder("X-QQ", "qq")
+ .addNodeWithoutOrder("X-SKYPE-USERNAME", "skype")
+ .addNodeWithoutOrder("X-YAHOO", "yahoo")
+ .addNodeWithoutOrder("X-MSN", "msn")
+ .addNodeWithoutOrder("X-NETMEETING", "netmeeting")
+ .addNodeWithoutOrder("X-AIM", "aim");
verifyOneComposition(resolver, handler, version);
}
private void testImPrefHandlingCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_AIM);
- contentValues.put(Im.DATA, "aim1");
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
+ .put(Im.DATA, "aim1");
- contentValues = resolver.buildData(Im.CONTENT_ITEM_TYPE);
- contentValues.put(Im.PROTOCOL, Im.PROTOCOL_AIM);
- contentValues.put(Im.DATA, "aim2");
- contentValues.put(Im.TYPE, Im.TYPE_HOME);
- contentValues.put(Im.IS_PRIMARY, 1);
+ resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+ .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
+ .put(Im.DATA, "aim2")
+ .put(Im.TYPE, Im.TYPE_HOME)
+ .put(Im.IS_PRIMARY, 1);
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("X-AIM", "aim1")
- .addNodeWithoutOrder("X-AIM", "aim2", new TypeSet("HOME", "PREF"));
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("X-AIM", "aim1")
+ .addNodeWithoutOrder("X-AIM", "aim2", new TypeSet("HOME", "PREF"));
verifyOneComposition(resolver, handler, version);
}
private void testWebsiteCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Website.CONTENT_ITEM_TYPE);
- contentValues.put(Website.URL, "http://website.example.android.com/index.html");
- contentValues.put(Website.TYPE, Website.TYPE_BLOG);
+ resolver.buildInput(Website.CONTENT_ITEM_TYPE)
+ .put(Website.URL, "http://website.example.android.com/index.html")
+ .put(Website.TYPE, Website.TYPE_BLOG);
- contentValues = resolver.buildData(Website.CONTENT_ITEM_TYPE);
- contentValues.put(Website.URL, "ftp://ftp.example.android.com/index.html");
- contentValues.put(Website.TYPE, Website.TYPE_FTP);
+ resolver.buildInput(Website.CONTENT_ITEM_TYPE)
+ .put(Website.URL, "ftp://ftp.example.android.com/index.html")
+ .put(Website.TYPE, Website.TYPE_FTP);
// We drop TYPE information since vCard (especially 3.0) does not allow us to emit it.
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("URL", "ftp://ftp.example.android.com/index.html")
- .addNodeWithoutOrder("URL", "http://website.example.android.com/index.html");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("URL", "ftp://ftp.example.android.com/index.html")
+ .addNodeWithoutOrder("URL", "http://website.example.android.com/index.html");
verifyOneComposition(resolver, handler, version);
}
private void testEventCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.TYPE, Event.TYPE_ANNIVERSARY);
- contentValues.put(Event.START_DATE, "1982-06-16");
+ resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+ .put(Event.TYPE, Event.TYPE_ANNIVERSARY)
+ .put(Event.START_DATE, "1982-06-16");
- contentValues = resolver.buildData(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.TYPE, Event.TYPE_BIRTHDAY);
- contentValues.put(Event.START_DATE, "2008-10-22");
+ resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+ .put(Event.TYPE, Event.TYPE_BIRTHDAY)
+ .put(Event.START_DATE, "2008-10-22");
- contentValues = resolver.buildData(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.TYPE, Event.TYPE_OTHER);
- contentValues.put(Event.START_DATE, "2018-03-12");
+ resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+ .put(Event.TYPE, Event.TYPE_OTHER)
+ .put(Event.START_DATE, "2018-03-12");
- contentValues = resolver.buildData(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.TYPE, Event.TYPE_CUSTOM);
- contentValues.put(Event.LABEL, "The last day");
- contentValues.put(Event.START_DATE, "When the Tower of Hanoi with 64 rings is completed.");
+ resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+ .put(Event.TYPE, Event.TYPE_CUSTOM)
+ .put(Event.LABEL, "The last day")
+ .put(Event.START_DATE, "When the Tower of Hanoi with 64 rings is completed.");
- contentValues = resolver.buildData(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.TYPE, Event.TYPE_BIRTHDAY);
- contentValues.put(Event.START_DATE, "2009-05-19");
+ resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+ .put(Event.TYPE, Event.TYPE_BIRTHDAY)
+ .put(Event.START_DATE, "2009-05-19");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithoutOrder("BDAY", "2008-10-22");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithoutOrder("BDAY", "2008-10-22");
verifyOneComposition(resolver, handler, version);
}
private void testNoteCommon(int version) {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Note.CONTENT_ITEM_TYPE);
- contentValues.put(Note.NOTE, "note1");
+ resolver.buildInput(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE, "note1");
- contentValues = resolver.buildData(Note.CONTENT_ITEM_TYPE);
- contentValues.put(Note.NOTE, "note2");
- contentValues.put(Note.IS_PRIMARY, 1); // Just ignored.
+ resolver.buildInput(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE, "note2")
+ .put(Note.IS_PRIMARY, 1); // Just ignored.
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithOrder("NOTE", "note1")
- .addNodeWithOrder("NOTE", "note2");
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithOrder("NOTE", "note1")
+ .addNodeWithOrder("NOTE", "note2");
verifyOneComposition(resolver, handler, version);
}
private void testPhotoCommon(int version) {
final boolean isV30 = version == V30;
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "PhotoTest");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "PhotoTest");
- contentValues = resolver.buildData(Photo.CONTENT_ITEM_TYPE);
- contentValues.put(Photo.PHOTO, sPhotoByteArray);
+ resolver.buildInput(Photo.CONTENT_ITEM_TYPE)
+ .put(Photo.PHOTO, sPhotoByteArray);
ContentValues contentValuesForPhoto = new ContentValues();
contentValuesForPhoto.put("ENCODING", (isV30 ? "b" : "BASE64"));
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
- handler.addNewVerifier()
- .addNodeWithoutOrder("FN", "PhotoTest")
- .addNodeWithoutOrder("N", "PhotoTest;;;;", Arrays.asList("PhotoTest", "", "", "", ""))
- .addNodeWithOrder("PHOTO", null, null, sPhotoByteArray,
- contentValuesForPhoto, new TypeSet("JPEG"), null);
+ handler.addPropertyNodesVerifier()
+ .addNodeWithoutOrder("FN", "PhotoTest")
+ .addNodeWithoutOrder("N", "PhotoTest;;;;",
+ Arrays.asList("PhotoTest", "", "", "", ""))
+ .addNodeWithOrder("PHOTO", null, null, sPhotoByteArray,
+ contentValuesForPhoto, new TypeSet("JPEG"), null);
verifyOneComposition(resolver, handler, version);
}
public void testV30HandleEscape() {
final int version = V30;
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "\\");
- contentValues.put(StructuredName.GIVEN_NAME, ";");
- contentValues.put(StructuredName.MIDDLE_NAME, ",");
- contentValues.put(StructuredName.PREFIX, "\n");
- contentValues.put(StructuredName.DISPLAY_NAME, "[<{Unescaped:Asciis}>]");
+ resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "\\")
+ .put(StructuredName.GIVEN_NAME, ";")
+ .put(StructuredName.MIDDLE_NAME, ",")
+ .put(StructuredName.PREFIX, "\n")
+ .put(StructuredName.DISPLAY_NAME, "[<{Unescaped:Asciis}>]");
VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
// Verifies the vCard String correctly escapes each character which must be escaped.
handler.addExpectedLine("N:\\\\;\\;;\\,;\\n;")
- .addExpectedLine("FN:[<{Unescaped:Asciis}>]");
- handler.addNewVerifier()
- .addNodeWithoutOrder("FN", "[<{Unescaped:Asciis}>]")
- .addNodeWithoutOrder("N", Arrays.asList("\\", ";", ",", "\n", ""));
+ .addExpectedLine("FN:[<{Unescaped:Asciis}>]");
+ handler.addPropertyNodesVerifier()
+ .addNodeWithoutOrder("FN", "[<{Unescaped:Asciis}>]")
+ .addNodeWithoutOrder("N", Arrays.asList("\\", ";", ",", "\n", ""));
verifyOneComposition(resolver, handler, version);
}
*/
public void testNickNameV21() {
ExportTestResolver resolver = new ExportTestResolver();
- ContentValues contentValues = resolver.buildData(Nickname.CONTENT_ITEM_TYPE);
- contentValues.put(Nickname.NAME, "Nicky");
+ resolver.buildInput(Nickname.CONTENT_ITEM_TYPE)
+ .put(Nickname.NAME, "Nicky");
- ContactStructVerifier verifier = new ContactStructVerifier();
- contentValues = verifier.createExpected(Nickname.CONTENT_ITEM_TYPE);
- contentValues.put(Nickname.NAME, "Nicky");
+ VCardVerificationHandler handler = new VCardVerificationHandler(this, V21);
+ handler.addPropertyVerifierWithEmptyName()
+ .addNodeWithOrder("X-ANDROID-CUSTOM",
+ Nickname.CONTENT_ITEM_TYPE + ";Nicky;;;;;;;;;;;;;;");
- VCardVerificationHandler handler = new VCardVerificationHandler(this, verifier, V21);
- handler.addNewVerifierWithEmptyName()
- .addNodeWithOrder("X-ANDROID-CUSTOM",
- Nickname.CONTENT_ITEM_TYPE + ";Nicky;;;;;;;;;;;;;;");
+ handler.addContentValuesVerifier()
+ .buildExpected(Nickname.CONTENT_ITEM_TYPE)
+ .put(Nickname.NAME, "Nicky");
verifyOneComposition(resolver, handler, V21);
}
is.close();
assertEquals(1, builder.vNodeList.size());
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("N", "Ando;Roid;", Arrays.asList("Ando", "Roid", ""));
+ .addNodeWithOrder("N", "Ando;Roid;", Arrays.asList("Ando", "Roid", ""));
verifier.verify(builder.vNodeList.get(0));
}
public void testV21SimpleCase1_Type_Generic() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "Ando");
- contentValues.put(StructuredName.GIVEN_NAME, "Roid");
- contentValues.put(StructuredName.DISPLAY_NAME, "Roid Ando");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "Ando")
+ .put(StructuredName.GIVEN_NAME, "Roid")
+ .put(StructuredName.DISPLAY_NAME, "Roid Ando");
verifier.verify(R.raw.v21_simple_1, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
public void testV21SimpleCase1_Type_Japanese() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "Ando");
- contentValues.put(StructuredName.GIVEN_NAME, "Roid");
- // If name-related strings only contains printable Ascii, the order is remained to be US's:
- // "Prefix Given Middle Family Suffix"
- contentValues.put(StructuredName.DISPLAY_NAME, "Roid Ando");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "Ando")
+ .put(StructuredName.GIVEN_NAME, "Roid")
+ // If name-related strings only contains printable Ascii,
+ // the order is remained to be US's:
+ // "Prefix Given Middle Family Suffix"
+ .put(StructuredName.DISPLAY_NAME, "Roid Ando");
verifier.verify(R.raw.v21_simple_1, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
}
public void testV21SimpleCase2() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.DISPLAY_NAME, "Ando Roid");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.DISPLAY_NAME, "Ando Roid");
verifier.verify(R.raw.v21_simple_2, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
public void testV21SimpleCase3() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "Ando");
- contentValues.put(StructuredName.GIVEN_NAME, "Roid");
- // "FN" field should be prefered since it should contain the original order intended by
- // the author of the file.
- contentValues.put(StructuredName.DISPLAY_NAME, "Ando Roid");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "Ando")
+ .put(StructuredName.GIVEN_NAME, "Roid")
+ // "FN" field should be prefered since it should contain the original order
+ // intended by the author of the file.
+ .put(StructuredName.DISPLAY_NAME, "Ando Roid");
verifier.verify(R.raw.v21_simple_3, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
is.close();
assertEquals(1, builder.vNodeList.size());
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", ";A;B\\;C\\;;D;:E;\\\\;",
- Arrays.asList("", "A;B\\", "C\\;", "D", ":E", "\\\\", ""))
- .addNodeWithOrder("FN", "A;B\\C\\;D:E\\\\");
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", ";A;B\\;C\\;;D;:E;\\\\;",
+ Arrays.asList("", "A;B\\", "C\\;", "D", ":E", "\\\\", ""))
+ .addNodeWithOrder("FN", "A;B\\C\\;D:E\\\\");
verifier.verify(builder.vNodeList.get(0));
}
* inserts name related data.
*/
public void testV21BackslashCase() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- // FAMILY_NAME is empty and removed in this test...
- contentValues.put(StructuredName.GIVEN_NAME, "A;B\\");
- contentValues.put(StructuredName.MIDDLE_NAME, "C\\;");
- contentValues.put(StructuredName.PREFIX, "D");
- contentValues.put(StructuredName.SUFFIX, ":E");
- contentValues.put(StructuredName.DISPLAY_NAME, "A;B\\C\\;D:E\\\\");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ // FAMILY_NAME is empty and removed in this test...
+ .put(StructuredName.GIVEN_NAME, "A;B\\")
+ .put(StructuredName.MIDDLE_NAME, "C\\;")
+ .put(StructuredName.PREFIX, "D")
+ .put(StructuredName.SUFFIX, ":E")
+ .put(StructuredName.DISPLAY_NAME, "A;B\\C\\;D:E\\\\");
verifier.verify(R.raw.v21_backslash, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
public void testOrgBeforTitle() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.DISPLAY_NAME, "Normal Guy");
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Company");
- contentValues.put(Organization.DEPARTMENT, "Organization Devision Room Sheet No.");
- contentValues.put(Organization.TITLE, "Excellent Janitor");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.DISPLAY_NAME, "Normal Guy");
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Company")
+ .put(Organization.DEPARTMENT, "Organization Devision Room Sheet No.")
+ .put(Organization.TITLE, "Excellent Janitor")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
verifier.verify(R.raw.v21_org_before_title, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
public void testTitleBeforOrg() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.DISPLAY_NAME, "Nice Guy");
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Marverous");
- contentValues.put(Organization.DEPARTMENT, "Perfect Great Good Bad Poor");
- contentValues.put(Organization.TITLE, "Cool Title");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.DISPLAY_NAME, "Nice Guy");
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Marverous")
+ .put(Organization.DEPARTMENT, "Perfect Great Good Bad Poor")
+ .put(Organization.TITLE, "Cool Title")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
verifier.verify(R.raw.v21_title_before_org, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
* The data contain three cases: one "PREF", no "PREF" and multiple "PREF", in each type.
*/
public void testV21PrefToIsPrimary() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.DISPLAY_NAME, "Smith");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "1");
- contentValues.put(Phone.TYPE, Phone.TYPE_HOME);
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "2");
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK);
- contentValues.put(Phone.IS_PRIMARY, 1);
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.NUMBER, "3");
- contentValues.put(Phone.TYPE, Phone.TYPE_ISDN);
-
- contentValues = verifier.createExpected(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "test@example.com");
- contentValues.put(Email.TYPE, Email.TYPE_HOME);
- contentValues.put(Email.IS_PRIMARY, 1);
-
- contentValues = verifier.createExpected(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.DATA, "test2@examination.com");
- contentValues.put(Email.TYPE, Email.TYPE_MOBILE);
- contentValues.put(Email.IS_PRIMARY, 1);
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Company");
- contentValues.put(Organization.TITLE, "Engineer");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Mystery");
- contentValues.put(Organization.TITLE, "Blogger");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Poetry");
- contentValues.put(Organization.TITLE, "Poet");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.DISPLAY_NAME, "Smith");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "1")
+ .put(Phone.TYPE, Phone.TYPE_HOME);
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "2")
+ .put(Phone.TYPE, Phone.TYPE_WORK)
+ .put(Phone.IS_PRIMARY, 1);
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.NUMBER, "3")
+ .put(Phone.TYPE, Phone.TYPE_ISDN);
+
+ verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "test@example.com")
+ .put(Email.TYPE, Email.TYPE_HOME)
+ .put(Email.IS_PRIMARY, 1);
+
+ verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+ .put(Email.DATA, "test2@examination.com")
+ .put(Email.TYPE, Email.TYPE_MOBILE)
+ .put(Email.IS_PRIMARY, 1);
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Company")
+ .put(Organization.TITLE, "Engineer")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Mystery")
+ .put(Organization.TITLE, "Blogger")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Poetry")
+ .put(Organization.TITLE, "Poet")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
verifier.verify(R.raw.v21_pref_handling, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
ContentValues contentValuesForPhoto = new ContentValues();
contentValuesForPhoto.put("ENCODING", "BASE64");
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", "Gump;Forrest;Hoge;Pos;Tao",
- Arrays.asList("Gump", "Forrest", "Hoge", "Pos", "Tao"))
- .addNodeWithOrder("FN", "Joe Due")
- .addNodeWithOrder("ORG", "Gump Shrimp Co.;Sales Dept.;Manager;Fish keeper",
- Arrays.asList("Gump Shrimp Co.", "Sales Dept.;Manager", "Fish keeper"))
- .addNodeWithOrder("ROLE", "Fish Cake Keeper!")
- .addNodeWithOrder("TITLE", "Shrimp Man")
- .addNodeWithOrder("X-CLASS", "PUBLIC")
- .addNodeWithOrder("TEL", "(111) 555-1212", new TypeSet("WORK", "VOICE"))
- .addNodeWithOrder("TEL", "(404) 555-1212", new TypeSet("HOME", "VOICE"))
- .addNodeWithOrder("TEL", "0311111111", new TypeSet("CELL"))
- .addNodeWithOrder("TEL", "0322222222", new TypeSet("VIDEO"))
- .addNodeWithOrder("TEL", "0333333333", new TypeSet("VOICE"))
- .addNodeWithOrder("ADR", ";;100 Waters Edge;Baytown;LA;30314;United States of America",
- Arrays.asList("", "", "100 Waters Edge", "Baytown",
- "LA", "30314", "United States of America"),
- null, null, new TypeSet("WORK"), null)
- .addNodeWithOrder("LABEL",
- "100 Waters Edge\r\nBaytown, LA 30314\r\nUnited States of America",
- null, null, contentValuesForQP, new TypeSet("WORK"), null)
- .addNodeWithOrder("ADR",
- ";;42 Plantation St.;Baytown;LA;30314;United States of America",
- Arrays.asList("", "", "42 Plantation St.", "Baytown",
- "LA", "30314", "United States of America"), null, null,
- new TypeSet("HOME"), null)
- .addNodeWithOrder("LABEL",
- "42 Plantation St.\r\nBaytown, LA 30314\r\nUnited States of America",
- null, null, contentValuesForQP,
- new TypeSet("HOME"), null)
- .addNodeWithOrder("EMAIL", "forrestgump@walladalla.com", new TypeSet("PREF", "INTERNET"))
- .addNodeWithOrder("EMAIL", "cell@example.com", new TypeSet("CELL"))
- .addNodeWithOrder("NOTE", "The following note is the example from RFC 2045.")
- .addNodeWithOrder("NOTE",
- "Now's the time for all folk to come to the aid of their country.",
- null, null, contentValuesForQP, null, null)
- .addNodeWithOrder("PHOTO", null,
- null, sPhotoByteArrayForComplicatedCase, contentValuesForPhoto,
- new TypeSet("JPEG"), null)
- .addNodeWithOrder("X-ATTRIBUTE", "Some String")
- .addNodeWithOrder("BDAY", "19800101")
- .addNodeWithOrder("GEO", "35.6563854,139.6994233")
- .addNodeWithOrder("URL", "http://www.example.com/")
- .addNodeWithOrder("REV", "20080424T195243Z");
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", "Gump;Forrest;Hoge;Pos;Tao",
+ Arrays.asList("Gump", "Forrest", "Hoge", "Pos", "Tao"))
+ .addNodeWithOrder("FN", "Joe Due")
+ .addNodeWithOrder("ORG", "Gump Shrimp Co.;Sales Dept.;Manager;Fish keeper",
+ Arrays.asList("Gump Shrimp Co.", "Sales Dept.;Manager", "Fish keeper"))
+ .addNodeWithOrder("ROLE", "Fish Cake Keeper!")
+ .addNodeWithOrder("TITLE", "Shrimp Man")
+ .addNodeWithOrder("X-CLASS", "PUBLIC")
+ .addNodeWithOrder("TEL", "(111) 555-1212", new TypeSet("WORK", "VOICE"))
+ .addNodeWithOrder("TEL", "(404) 555-1212", new TypeSet("HOME", "VOICE"))
+ .addNodeWithOrder("TEL", "0311111111", new TypeSet("CELL"))
+ .addNodeWithOrder("TEL", "0322222222", new TypeSet("VIDEO"))
+ .addNodeWithOrder("TEL", "0333333333", new TypeSet("VOICE"))
+ .addNodeWithOrder("ADR",
+ ";;100 Waters Edge;Baytown;LA;30314;United States of America",
+ Arrays.asList("", "", "100 Waters Edge", "Baytown",
+ "LA", "30314", "United States of America"),
+ null, null, new TypeSet("WORK"), null)
+ .addNodeWithOrder("LABEL",
+ "100 Waters Edge\r\nBaytown, LA 30314\r\nUnited States of America",
+ null, null, contentValuesForQP, new TypeSet("WORK"), null)
+ .addNodeWithOrder("ADR",
+ ";;42 Plantation St.;Baytown;LA;30314;United States of America",
+ Arrays.asList("", "", "42 Plantation St.", "Baytown",
+ "LA", "30314", "United States of America"), null, null,
+ new TypeSet("HOME"), null)
+ .addNodeWithOrder("LABEL",
+ "42 Plantation St.\r\nBaytown, LA 30314\r\nUnited States of America",
+ null, null, contentValuesForQP,
+ new TypeSet("HOME"), null)
+ .addNodeWithOrder("EMAIL", "forrestgump@walladalla.com",
+ new TypeSet("PREF", "INTERNET"))
+ .addNodeWithOrder("EMAIL", "cell@example.com", new TypeSet("CELL"))
+ .addNodeWithOrder("NOTE", "The following note is the example from RFC 2045.")
+ .addNodeWithOrder("NOTE",
+ "Now's the time for all folk to come to the aid of their country.",
+ null, null, contentValuesForQP, null, null)
+ .addNodeWithOrder("PHOTO", null,
+ null, sPhotoByteArrayForComplicatedCase, contentValuesForPhoto,
+ new TypeSet("JPEG"), null)
+ .addNodeWithOrder("X-ATTRIBUTE", "Some String")
+ .addNodeWithOrder("BDAY", "19800101")
+ .addNodeWithOrder("GEO", "35.6563854,139.6994233")
+ .addNodeWithOrder("URL", "http://www.example.com/")
+ .addNodeWithOrder("REV", "20080424T195243Z");
verifier.verify(builder.vNodeList.get(0));
}
* into ContentResolver.
*/
public void testV21ComplicatedCase() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "Gump");
- contentValues.put(StructuredName.GIVEN_NAME, "Forrest");
- contentValues.put(StructuredName.MIDDLE_NAME, "Hoge");
- contentValues.put(StructuredName.PREFIX, "Pos");
- contentValues.put(StructuredName.SUFFIX, "Tao");
- contentValues.put(StructuredName.DISPLAY_NAME, "Joe Due");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "Gump")
+ .put(StructuredName.GIVEN_NAME, "Forrest")
+ .put(StructuredName.MIDDLE_NAME, "Hoge")
+ .put(StructuredName.PREFIX, "Pos")
+ .put(StructuredName.SUFFIX, "Tao")
+ .put(StructuredName.DISPLAY_NAME, "Joe Due");
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
- contentValues.put(Organization.COMPANY, "Gump Shrimp Co.");
- contentValues.put(Organization.DEPARTMENT, "Sales Dept.;Manager Fish keeper");
- contentValues.put(Organization.TITLE, "Shrimp Man");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_WORK);
- // Phone number is expected to be formated with NAMP format in default.
- contentValues.put(Phone.NUMBER, "111-555-1212");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_HOME);
- contentValues.put(Phone.NUMBER, "404-555-1212");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_MOBILE);
- contentValues.put(Phone.NUMBER, "031-111-1111");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_CUSTOM);
- contentValues.put(Phone.LABEL, "VIDEO");
- contentValues.put(Phone.NUMBER, "032-222-2222");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_CUSTOM);
- contentValues.put(Phone.LABEL, "VOICE");
- contentValues.put(Phone.NUMBER, "033-333-3333");
-
- contentValues = verifier.createExpected(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.TYPE, StructuredPostal.TYPE_WORK);
- contentValues.put(StructuredPostal.COUNTRY, "United States of America");
- contentValues.put(StructuredPostal.POSTCODE, "30314");
- contentValues.put(StructuredPostal.REGION, "LA");
- contentValues.put(StructuredPostal.CITY, "Baytown");
- contentValues.put(StructuredPostal.STREET, "100 Waters Edge");
- contentValues.put(StructuredPostal.FORMATTED_ADDRESS,
- "100 Waters Edge Baytown LA 30314 United States of America");
-
- contentValues = verifier.createExpected(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME);
- contentValues.put(StructuredPostal.COUNTRY, "United States of America");
- contentValues.put(StructuredPostal.POSTCODE, "30314");
- contentValues.put(StructuredPostal.REGION, "LA");
- contentValues.put(StructuredPostal.CITY, "Baytown");
- contentValues.put(StructuredPostal.STREET, "42 Plantation St.");
- contentValues.put(StructuredPostal.FORMATTED_ADDRESS,
- "42 Plantation St. Baytown LA 30314 United States of America");
-
- contentValues = verifier.createExpected(Email.CONTENT_ITEM_TYPE);
- // "TYPE=INTERNET" -> TYPE_CUSTOM + the label "INTERNET"
- contentValues.put(Email.TYPE, Email.TYPE_CUSTOM);
- contentValues.put(Email.LABEL, "INTERNET");
- contentValues.put(Email.DATA, "forrestgump@walladalla.com");
- contentValues.put(Email.IS_PRIMARY, 1);
-
- contentValues = verifier.createExpected(Email.CONTENT_ITEM_TYPE);
- contentValues.put(Email.TYPE, Email.TYPE_MOBILE);
- contentValues.put(Email.DATA, "cell@example.com");
-
- contentValues = verifier.createExpected(Note.CONTENT_ITEM_TYPE);
- contentValues.put(Note.NOTE, "The following note is the example from RFC 2045.");
-
- contentValues = verifier.createExpected(Note.CONTENT_ITEM_TYPE);
- contentValues.put(Note.NOTE,
- "Now's the time for all folk to come to the aid of their country.");
-
- contentValues = verifier.createExpected(Photo.CONTENT_ITEM_TYPE);
- // No information about its image format can be inserted.
- contentValues.put(Photo.PHOTO, sPhotoByteArrayForComplicatedCase);
-
- contentValues = verifier.createExpected(Event.CONTENT_ITEM_TYPE);
- contentValues.put(Event.START_DATE, "19800101");
- contentValues.put(Event.TYPE, Event.TYPE_BIRTHDAY);
-
- contentValues = verifier.createExpected(Website.CONTENT_ITEM_TYPE);
- contentValues.put(Website.URL, "http://www.example.com/");
- contentValues.put(Website.TYPE, Website.TYPE_HOMEPAGE);
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.TYPE, Organization.TYPE_WORK)
+ .put(Organization.COMPANY, "Gump Shrimp Co.")
+ .put(Organization.DEPARTMENT, "Sales Dept.;Manager Fish keeper")
+ .put(Organization.TITLE, "Shrimp Man");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_WORK)
+ // Phone number is expected to be formated with NAMP format in default.
+ .put(Phone.NUMBER, "111-555-1212");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_HOME)
+ .put(Phone.NUMBER, "404-555-1212");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_MOBILE)
+ .put(Phone.NUMBER, "031-111-1111");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+ .put(Phone.LABEL, "VIDEO")
+ .put(Phone.NUMBER, "032-222-2222");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+ .put(Phone.LABEL, "VOICE")
+ .put(Phone.NUMBER, "033-333-3333");
+
+ verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.TYPE, StructuredPostal.TYPE_WORK)
+ .put(StructuredPostal.COUNTRY, "United States of America")
+ .put(StructuredPostal.POSTCODE, "30314")
+ .put(StructuredPostal.REGION, "LA")
+ .put(StructuredPostal.CITY, "Baytown")
+ .put(StructuredPostal.STREET, "100 Waters Edge")
+ .put(StructuredPostal.FORMATTED_ADDRESS,
+ "100 Waters Edge Baytown LA 30314 United States of America");
+
+ verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME)
+ .put(StructuredPostal.COUNTRY, "United States of America")
+ .put(StructuredPostal.POSTCODE, "30314")
+ .put(StructuredPostal.REGION, "LA")
+ .put(StructuredPostal.CITY, "Baytown")
+ .put(StructuredPostal.STREET, "42 Plantation St.")
+ .put(StructuredPostal.FORMATTED_ADDRESS,
+ "42 Plantation St. Baytown LA 30314 United States of America");
+
+ verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+ // "TYPE=INTERNET" -> TYPE_CUSTOM + the label "INTERNET"
+ .put(Email.TYPE, Email.TYPE_CUSTOM)
+ .put(Email.LABEL, "INTERNET")
+ .put(Email.DATA, "forrestgump@walladalla.com")
+ .put(Email.IS_PRIMARY, 1);
+
+ verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+ .put(Email.TYPE, Email.TYPE_MOBILE)
+ .put(Email.DATA, "cell@example.com");
+
+ verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE, "The following note is the example from RFC 2045.");
+
+ verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE,
+ "Now's the time for all folk to come to the aid of their country.");
+
+ verifier.buildExpected(Photo.CONTENT_ITEM_TYPE)
+ // No information about its image format can be inserted.
+ .put(Photo.PHOTO, sPhotoByteArrayForComplicatedCase);
+
+ verifier.buildExpected(Event.CONTENT_ITEM_TYPE)
+ .put(Event.START_DATE, "19800101")
+ .put(Event.TYPE, Event.TYPE_BIRTHDAY);
+
+ verifier.buildExpected(Website.CONTENT_ITEM_TYPE)
+ .put(Website.URL, "http://www.example.com/")
+ .put(Website.TYPE, Website.TYPE_HOMEPAGE);
verifier.verify(R.raw.v21_complicated, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
is.close();
assertEquals(1, builder.vNodeList.size());
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "3.0")
- .addNodeWithOrder("FN", "And Roid")
- .addNodeWithOrder("N", "And;Roid;;;", Arrays.asList("And", "Roid", "", "", ""))
- .addNodeWithOrder("ORG", "Open;Handset; Alliance",
- Arrays.asList("Open", "Handset", " Alliance"))
- .addNodeWithOrder("SORT-STRING", "android")
- .addNodeWithOrder("TEL", "0300000000", new TypeSet("PREF", "VOICE"))
- .addNodeWithOrder("CLASS", "PUBLIC")
- .addNodeWithOrder("X-GNO", "0")
- .addNodeWithOrder("X-GN", "group0")
- .addNodeWithOrder("X-REDUCTION", "0")
- .addNodeWithOrder("REV", "20081031T065854Z");
+ .addNodeWithOrder("VERSION", "3.0")
+ .addNodeWithOrder("FN", "And Roid")
+ .addNodeWithOrder("N", "And;Roid;;;", Arrays.asList("And", "Roid", "", "", ""))
+ .addNodeWithOrder("ORG", "Open;Handset; Alliance",
+ Arrays.asList("Open", "Handset", " Alliance"))
+ .addNodeWithOrder("SORT-STRING", "android")
+ .addNodeWithOrder("TEL", "0300000000", new TypeSet("PREF", "VOICE"))
+ .addNodeWithOrder("CLASS", "PUBLIC")
+ .addNodeWithOrder("X-GNO", "0")
+ .addNodeWithOrder("X-GN", "group0")
+ .addNodeWithOrder("X-REDUCTION", "0")
+ .addNodeWithOrder("REV", "20081031T065854Z");
verifier.verify(builder.vNodeList.get(0));
}
public void testV30Simple() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "And");
- contentValues.put(StructuredName.GIVEN_NAME, "Roid");
- contentValues.put(StructuredName.DISPLAY_NAME, "And Roid");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME, "android");
-
- contentValues = verifier.createExpected(Organization.CONTENT_ITEM_TYPE);
- contentValues.put(Organization.COMPANY, "Open");
- contentValues.put(Organization.DEPARTMENT, "Handset Alliance");
- contentValues.put(Organization.TYPE, Organization.TYPE_WORK);
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- contentValues.put(Phone.TYPE, Phone.TYPE_CUSTOM);
- contentValues.put(Phone.LABEL, "VOICE");
- contentValues.put(Phone.NUMBER, "030-000-0000");
- contentValues.put(Phone.IS_PRIMARY, 1);
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "And")
+ .put(StructuredName.GIVEN_NAME, "Roid")
+ .put(StructuredName.DISPLAY_NAME, "And Roid")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "android");
+
+ verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+ .put(Organization.COMPANY, "Open")
+ .put(Organization.DEPARTMENT, "Handset Alliance")
+ .put(Organization.TYPE, Organization.TYPE_WORK);
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+ .put(Phone.LABEL, "VOICE")
+ .put(Phone.NUMBER, "030-000-0000")
+ .put(Phone.IS_PRIMARY, 1);
verifier.verify(R.raw.v30_simple, VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8);
}
assertEquals(1, builder.vNodeList.size());
ContentValues contentValuesForShiftJis = new ContentValues();
contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
- ContentValues contentValuesForQP = new ContentValues();
- contentValuesForQP.put("ENCODING", "QUOTED-PRINTABLE");
- contentValuesForQP.put("CHARSET", "SHIFT_JIS");
// Though Japanese careers append ";;;;" at the end of the value of "SOUND",
// vCard 2.1/3.0 specification does not allow multiple values.
// Do not need to handle it as multiple values.
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1", null, null, null, null, null)
- .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9;;;;",
- Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9", "", "", "", ""),
- null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("SOUND", "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E;;;;",
- null, null, contentValuesForShiftJis,
- new TypeSet("X-IRMC-N"), null)
- .addNodeWithOrder("TEL", "0300000000", null, null, null,
- new TypeSet("VOICE", "PREF"), null);
+ .addNodeWithOrder("VERSION", "2.1", null, null, null, null, null)
+ .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9;;;;",
+ Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9", "", "", "", ""),
+ null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("SOUND",
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E;;;;",
+ null, null, contentValuesForShiftJis,
+ new TypeSet("X-IRMC-N"), null)
+ .addNodeWithOrder("TEL", "0300000000", null, null, null,
+ new TypeSet("VOICE", "PREF"), null);
verifier.verify(builder.vNodeList.get(0));
}
private void testV21Japanese1Common(int resId, int vcardType, boolean japanese)
throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
-
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9");
- contentValues.put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9");
- // While vCard parser does not split "SOUND" property values, ContactStruct care it.
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME,
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E");
-
- contentValues = verifier.createExpected(Phone.CONTENT_ITEM_TYPE);
- // Phone number formatting is different.
- if (japanese) {
- contentValues.put(Phone.NUMBER, "03-0000-0000");
- } else {
- contentValues.put(Phone.NUMBER, "030-000-0000");
- }
- contentValues.put(Phone.TYPE, Phone.TYPE_CUSTOM);
- contentValues.put(Phone.LABEL, "VOICE");
- contentValues.put(Phone.IS_PRIMARY, 1);
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9")
+ .put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9")
+ // While vCard parser does not split "SOUND" property values,
+ // ContactStruct care it.
+ .put(StructuredName.PHONETIC_FAMILY_NAME,
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E");
+
+ verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+ // Phone number formatting is different.
+ .put(Phone.NUMBER, (japanese ? "03-0000-0000" : "030-000-0000"))
+ .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+ .put(Phone.LABEL, "VOICE")
+ .put(Phone.IS_PRIMARY, 1);
verifier.verify(resId, vcardType);
}
assertEquals(1, builder.vNodeList.size());
ContentValues contentValuesForShiftJis = new ContentValues();
contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
- ContentValues contentValuesForQP = new ContentValues();
- contentValuesForQP.put("ENCODING", "QUOTED-PRINTABLE");
- contentValuesForQP.put("CHARSET", "SHIFT_JIS");
+ ContentValues contentValuesForQPAndSJ = new ContentValues();
+ contentValuesForQPAndSJ.put("ENCODING", "QUOTED-PRINTABLE");
+ contentValuesForQPAndSJ.put("CHARSET", "SHIFT_JIS");
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", "\u5B89\u85E4;\u30ED\u30A4\u30C9\u0031;;;",
- Arrays.asList("\u5B89\u85E4", "\u30ED\u30A4\u30C9\u0031",
- "", "", ""),
- null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("FN", "\u5B89\u85E4\u0020\u30ED\u30A4\u30C9\u0020\u0031",
- null, null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("SOUND",
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73;\uFF9B\uFF72\uFF84\uFF9E\u0031;;;",
- null, null, contentValuesForShiftJis,
- new TypeSet("X-IRMC-N"), null)
- .addNodeWithOrder("ADR",
- ";\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
- "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
- "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC\u0036" +
- "\u968E;;;;150-8512;",
- Arrays.asList("",
- "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
- "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
- "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
- "\u0036\u968E", "", "", "", "150-8512", ""),
- null, contentValuesForQP, new TypeSet("HOME"), null)
- .addNodeWithOrder("NOTE", "\u30E1\u30E2", null, null, contentValuesForQP, null, null);
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", "\u5B89\u85E4;\u30ED\u30A4\u30C9\u0031;;;",
+ Arrays.asList("\u5B89\u85E4", "\u30ED\u30A4\u30C9\u0031",
+ "", "", ""),
+ null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("FN", "\u5B89\u85E4\u0020\u30ED\u30A4\u30C9\u0020\u0031",
+ null, null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("SOUND",
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73;\uFF9B\uFF72\uFF84\uFF9E\u0031;;;",
+ null, null, contentValuesForShiftJis,
+ new TypeSet("X-IRMC-N"), null)
+ .addNodeWithOrder("ADR",
+ ";\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
+ "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
+ "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC\u0036" +
+ "\u968E;;;;150-8512;",
+ Arrays.asList("",
+ "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
+ "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
+ "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
+ "\u0036\u968E", "", "", "", "150-8512", ""),
+ null, contentValuesForQPAndSJ, new TypeSet("HOME"), null)
+ .addNodeWithOrder("NOTE", "\u30E1\u30E2", null, null,
+ contentValuesForQPAndSJ, null, null);
verifier.verify(builder.vNodeList.get(0));
}
public void testV21Japanese2_Type_Generic_Utf8() throws IOException, VCardException {
- ContactStructVerifier verifier = new ContactStructVerifier();
- ContentValues contentValues =
- verifier.createExpected(StructuredName.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredName.FAMILY_NAME, "\u5B89\u85E4");
- contentValues.put(StructuredName.GIVEN_NAME, "\u30ED\u30A4\u30C9\u0031");
- contentValues.put(StructuredName.DISPLAY_NAME,
- "\u5B89\u85E4\u0020\u30ED\u30A4\u30C9\u0020\u0031");
- // ContactStruct should correctly split "SOUND" property into several elements,
- // even though VCardParser side does not care it.
- contentValues.put(StructuredName.PHONETIC_FAMILY_NAME,
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73");
- contentValues.put(StructuredName.PHONETIC_GIVEN_NAME,
- "\uFF9B\uFF72\uFF84\uFF9E\u0031");
-
- contentValues = verifier.createExpected(StructuredPostal.CONTENT_ITEM_TYPE);
- contentValues.put(StructuredPostal.POSTCODE, "150-8512");
- contentValues.put(StructuredPostal.NEIGHBORHOOD,
- "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
- "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
- "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
- "\u0036\u968E");
- contentValues.put(StructuredPostal.FORMATTED_ADDRESS,
- "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
- "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
- "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
- "\u0036\u968E 150-8512");
- contentValues.put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME);
- contentValues = verifier.createExpected(Note.CONTENT_ITEM_TYPE);
- contentValues.put(Note.NOTE, "\u30E1\u30E2");
+ ContentValuesVerifier verifier = new ContentValuesVerifier();
+ verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4")
+ .put(StructuredName.GIVEN_NAME, "\u30ED\u30A4\u30C9\u0031")
+ .put(StructuredName.DISPLAY_NAME,
+ "\u5B89\u85E4\u0020\u30ED\u30A4\u30C9\u0020\u0031")
+ // ContactStruct should correctly split "SOUND" property into several elements,
+ // even though VCardParser side does not care it.
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "\uFF71\uFF9D\uFF84\uFF9E\uFF73")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\uFF9B\uFF72\uFF84\uFF9E\u0031");
+
+ verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+ .put(StructuredPostal.POSTCODE, "150-8512")
+ .put(StructuredPostal.NEIGHBORHOOD,
+ "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
+ "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
+ "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
+ "\u0036\u968E")
+ .put(StructuredPostal.FORMATTED_ADDRESS,
+ "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
+ "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
+ "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
+ "\u0036\u968E 150-8512")
+ .put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME);
+ verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE, "\u30E1\u30E2");
verifier.verify(R.raw.v21_japanese_2, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
}
- // Following tests are old ones, though they still work fine.
-
public void testV21MultipleEntryCase() throws IOException, VCardException {
VCardParser_V21 parser = new VCardParser_V21();
VNodeBuilder builder = new VNodeBuilder();
ContentValues contentValuesForShiftJis = new ContentValues();
contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033;;;;",
- Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0033", "", "", "", ""),
- null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("SOUND",
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0033;;;;",
- null, null, contentValuesForShiftJis,
- new TypeSet("X-IRMC-N"), null)
- .addNodeWithOrder("TEL", "9", new TypeSet("X-NEC-SECRET"))
- .addNodeWithOrder("TEL", "10", new TypeSet("X-NEC-HOTEL"))
- .addNodeWithOrder("TEL", "11", new TypeSet("X-NEC-SCHOOL"))
- .addNodeWithOrder("TEL", "12", new TypeSet("FAX", "HOME"));
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033;;;;",
+ Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0033", "", "", "", ""),
+ null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("SOUND",
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0033;;;;",
+ null, null, contentValuesForShiftJis,
+ new TypeSet("X-IRMC-N"), null)
+ .addNodeWithOrder("TEL", "9", new TypeSet("X-NEC-SECRET"))
+ .addNodeWithOrder("TEL", "10", new TypeSet("X-NEC-HOTEL"))
+ .addNodeWithOrder("TEL", "11", new TypeSet("X-NEC-SCHOOL"))
+ .addNodeWithOrder("TEL", "12", new TypeSet("FAX", "HOME"));
verifier.verify(builder.vNodeList.get(0));
verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034;;;;",
- Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0034", "", "", "", ""),
- null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("SOUND",
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0034;;;;",
- null, null, contentValuesForShiftJis,
- new TypeSet("X-IRMC-N"), null)
- .addNodeWithOrder("TEL", "13", new TypeSet("MODEM"))
- .addNodeWithOrder("TEL", "14", new TypeSet("PAGER"))
- .addNodeWithOrder("TEL", "15", new TypeSet("X-NEC-FAMILY"))
- .addNodeWithOrder("TEL", "16", new TypeSet("X-NEC-GIRL"));
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034;;;;",
+ Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0034", "", "", "", ""),
+ null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("SOUND",
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0034;;;;",
+ null, null, contentValuesForShiftJis,
+ new TypeSet("X-IRMC-N"), null)
+ .addNodeWithOrder("TEL", "13", new TypeSet("MODEM"))
+ .addNodeWithOrder("TEL", "14", new TypeSet("PAGER"))
+ .addNodeWithOrder("TEL", "15", new TypeSet("X-NEC-FAMILY"))
+ .addNodeWithOrder("TEL", "16", new TypeSet("X-NEC-GIRL"));
verifier.verify(builder.vNodeList.get(1));
verifier = new PropertyNodesVerifier(this)
- .addNodeWithOrder("VERSION", "2.1")
- .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035;;;;",
- Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0035", "", "", "", ""),
- null, contentValuesForShiftJis, null, null)
- .addNodeWithOrder("SOUND",
- "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0035;;;;",
- null, null, contentValuesForShiftJis,
- new TypeSet("X-IRMC-N"), null)
- .addNodeWithOrder("TEL", "17", new TypeSet("X-NEC-BOY"))
- .addNodeWithOrder("TEL", "18", new TypeSet("X-NEC-FRIEND"))
- .addNodeWithOrder("TEL", "19", new TypeSet("X-NEC-PHS"))
- .addNodeWithOrder("TEL", "20", new TypeSet("X-NEC-RESTAURANT"));
+ .addNodeWithOrder("VERSION", "2.1")
+ .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035;;;;",
+ Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0035", "", "", "", ""),
+ null, contentValuesForShiftJis, null, null)
+ .addNodeWithOrder("SOUND",
+ "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0035;;;;",
+ null, null, contentValuesForShiftJis,
+ new TypeSet("X-IRMC-N"), null)
+ .addNodeWithOrder("TEL", "17", new TypeSet("X-NEC-BOY"))
+ .addNodeWithOrder("TEL", "18", new TypeSet("X-NEC-FRIEND"))
+ .addNodeWithOrder("TEL", "19", new TypeSet("X-NEC-PHS"))
+ .addNodeWithOrder("TEL", "20", new TypeSet("X-NEC-RESTAURANT"));
verifier.verify(builder.vNodeList.get(2));
}
}