1 // xestiaab_contactload.h - Xestia Address Book Contact Load Unit Tests.
3 // (c) 2012-2015 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include <gtest/gtest.h>
20 #include "../contacteditor/cdo/ContactDataObject.h"
22 TEST(ContactLoad, ContactLoadTests){
24 ContactDataObject TestFile;
26 // Check that the file given is not missing.
28 ASSERT_EQ(CONTACTLOAD_FILEMISSING, TestFile.LoadFile("MissingFile.vcf"));
30 // Check that the file given does not have an error when attempting to
33 ASSERT_EQ(CONTACTLOAD_FILEERROR, TestFile.LoadFile("InvalidPermissions.vcf"));
35 // Check that the file is a valid vCard 4.0 file.
37 ASSERT_EQ(CONTACTLOAD_FILEINVALIDFORMAT, TestFile.LoadFile("LoadCheck-Load1-v3.vcf"));
39 // Check that the vCard 4.0 file meets the base specification.
41 ASSERT_EQ(CONTACTLOAD_FILEBASESPECFAIL, TestFile.LoadFile("LoadCheck-Load3.vcf"));
43 // Check that the vCard 4.0 file loads OK.
45 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
47 // Check that the kind status has been set. (KIND).
49 ASSERT_NE(CONTACTKIND_NONE, TestFile.ContactKind);
50 ASSERT_EQ(CONTACTKIND_INDIVIDUAL, TestFile.ContactKind);
52 // Check that the groups have been read (MEMBER).
54 std::map<int,wxString>::iterator TestFileIter;
55 std::map<int,int>::iterator TestFileIntIter;
57 TestFileIter = TestFile.GroupsList.find(0);
59 ASSERT_NE(TestFile.GroupsList.end(), TestFileIter);
60 ASSERT_EQ("7a2af44d-6431-4797-a55f-d86d56304fda", TestFileIter->second);
62 // Check the ALTID parameter.
64 TestFileIter = TestFile.GroupsListAltID.find(0);
65 ASSERT_NE(TestFile.GroupsListAltID.end(), TestFileIter);
66 ASSERT_EQ("35", TestFileIter->second);
68 // Check the PID parameter.
70 TestFileIter = TestFile.GroupsListPID.find(0);
71 ASSERT_NE(TestFile.GroupsListPID.end(), TestFileIter);
72 ASSERT_EQ("40", TestFileIter->second);
74 // Check the PREF parameter.
76 TestFileIntIter = TestFile.GroupsListPref.find(0);
77 ASSERT_NE(TestFile.GroupsListPref.end(), TestFileIntIter);
78 ASSERT_EQ(45, TestFileIntIter->second);
80 // Check the MEDIATYPE parameter.
82 TestFileIter = TestFile.GroupsListMediaType.find(0);
83 ASSERT_NE(TestFile.GroupsListMediaType.end(), TestFileIter);
84 ASSERT_EQ("text/plain", TestFileIter->second);
86 // Check the extra tokens parameter.
88 TestFileIter = TestFile.GroupsListTokens.find(0);
89 ASSERT_NE(TestFile.GroupsListTokens.end(), TestFileIter);
90 ASSERT_EQ("EXAMPLE=Meep", TestFileIter->second);
92 // Check that the formatted name has been read (FN).
94 TestFileIter = TestFile.FullNamesList.find(0);
95 ASSERT_NE(TestFile.FullNamesList.end(), TestFileIter);
96 ASSERT_EQ("Test Contact", TestFileIter->second);
98 // Check the TYPE parameter.
100 TestFileIter = TestFile.FullNamesListType.find(0);
101 ASSERT_NE(TestFile.FullNamesListType.end(), TestFileIter);
102 ASSERT_EQ("work", TestFileIter->second);
104 // Check the LANGUAGE parameter.
106 TestFileIter = TestFile.FullNamesListLanguage.find(0);
107 ASSERT_NE(TestFile.FullNamesListLanguage.end(), TestFileIter);
108 ASSERT_EQ("kw", TestFileIter->second);
110 // Check the ALTID parameter.
112 TestFileIter = TestFile.FullNamesListAltID.find(0);
113 ASSERT_NE(TestFile.FullNamesListAltID.end(), TestFileIter);
114 ASSERT_EQ("500", TestFileIter->second);
116 // Check the PID parameter.
118 TestFileIter = TestFile.FullNamesListPID.find(0);
119 ASSERT_NE(TestFile.FullNamesListPID.end(), TestFileIter);
120 ASSERT_EQ("40", TestFileIter->second);
122 // Check the PREF parameter.
124 TestFileIntIter = TestFile.FullNamesListPref.find(0);
125 ASSERT_NE(TestFile.FullNamesListPref.end(), TestFileIntIter);
126 ASSERT_EQ(45, TestFileIntIter->second);
128 // Check for the extra tokens parameter.
130 TestFileIter = TestFile.FullNamesListTokens.find(0);
131 ASSERT_NE(TestFile.FullNamesListTokens.end(), TestFileIter);
132 ASSERT_EQ("EXAMPLE=Baaa", TestFileIter->second);
134 // Check that the name has been read (N).
136 ASSERT_EQ("Contact", TestFile.NameSurname);
137 ASSERT_EQ("Test", TestFile.NameForename);
138 ASSERT_EQ("Example", TestFile.NameOtherNames);
139 ASSERT_EQ("Robot", TestFile.NameTitle);
140 ASSERT_EQ("LOONY", TestFile.NameSuffix);
142 // Check the ALTID parameter.
144 ASSERT_EQ("3", TestFile.NameAltID);
146 // Check the LANGUAGE parameter.
148 ASSERT_EQ("kw", TestFile.NameLanguage);
150 // Check the SORT-AS parameter.
152 ASSERT_EQ("Contact,Test", TestFile.NameDisplayAs);
154 // Check the extra tokens parameter.
156 ASSERT_EQ("TEST=Yes", TestFile.NameTokens);
160 TEST(ContactLoad, UIDTest){
162 ContactDataObject TestFile;
164 // Check that the vCard 4.0 file loads OK.
166 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
168 ASSERT_EQ("903588-9082374-989120310-AAFECDBCDF", TestFile.UIDToken);
172 TEST(ContactLoad, ClientPIDMapTests){
174 ContactDataObject TestFile;
176 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
178 std::map<int,wxString>::iterator TestFileIter;
180 // Test the first Client PID Map.
182 TestFileIter = TestFile.ClientPIDList.find(0);
183 ASSERT_NE(TestFile.ClientPIDList.end(), TestFileIter);
184 ASSERT_EQ("1;urn;uuid:aaaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", TestFileIter->second);
186 TestFileIter = TestFile.ClientPIDListTokens.find(0);
187 ASSERT_EQ(TestFile.ClientPIDListTokens.end(), TestFileIter);
189 // Test the second Client PID Map.
191 TestFileIter = TestFile.ClientPIDList.find(1);
192 ASSERT_NE(TestFile.ClientPIDList.end(), TestFileIter);
193 ASSERT_EQ("2;urn;uuid:ccccccccc-cccc-cccc-cccc-cccccccccccc", TestFileIter->second);
195 TestFileIter = TestFile.ClientPIDListTokens.find(1);
196 ASSERT_EQ(TestFile.ClientPIDListTokens.end(), TestFileIter);
198 // Test the third Client PID Map.
200 TestFileIter = TestFile.ClientPIDListTokens.find(2);
201 ASSERT_NE(TestFile.ClientPIDListTokens.end(), TestFileIter);
202 ASSERT_EQ("MEEP=MOO;WOOP=WOO", TestFileIter->second);
204 TestFileIter = TestFile.ClientPIDList.find(2);
205 ASSERT_NE(TestFile.ClientPIDList.end(), TestFileIter);
206 ASSERT_EQ("3;urn;uuid:bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", TestFileIter->second);
210 TEST(ContactLoad, RevisionTests){
212 ContactDataObject TestFile;
214 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
216 ASSERT_EQ("20151227T033000Z", TestFile.Revision);
217 ASSERT_EQ("TEST=YES;DATA=NO;MORE=MAYBE", TestFile.RevisionTokens);
221 TEST(ContactLoad, SourceTests){
223 ContactDataObject TestFile;
225 // Check that the vCard 4.0 file loads OK.
227 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
229 std::map<int,wxString>::iterator TestFileIter;
230 std::map<int,int>::iterator TestFileIntIter;
232 // Start with a general source address.
234 TestFileIter = TestFile.SourceList.find(0);
235 ASSERT_NE(TestFile.SourceList.end(), TestFileIter);
236 ASSERT_EQ("http://example.com/source/sourcea.vcf", TestFileIter->second);
238 // Check the TYPE section.
240 TestFileIter = TestFile.SourceListType.find(0);
241 ASSERT_EQ(TestFile.SourceListType.end(), TestFileIter);
243 // Check the ALTID section.
245 TestFileIter = TestFile.SourceListAltID.find(0);
246 ASSERT_NE(TestFile.SourceListAltID.end(), TestFileIter);
247 ASSERT_EQ("74", TestFileIter->second);
249 // Check the PID section.
251 TestFileIter = TestFile.SourceListPID.find(0);
252 ASSERT_NE(TestFile.SourceListPID.end(), TestFileIter);
253 ASSERT_EQ("71", TestFileIter->second);
255 // Check the MEDIATYPE section.
257 TestFileIter = TestFile.SourceListMediatype.find(0);
258 ASSERT_NE(TestFile.SourceListMediatype.end(), TestFileIter);
259 ASSERT_EQ("text/plain", TestFileIter->second);
261 // Check the PREF section.
263 TestFileIntIter = TestFile.SourceListPref.find(0);
264 ASSERT_NE(TestFile.SourceListPref.end(), TestFileIntIter);
265 ASSERT_EQ(72, TestFileIntIter->second);
267 // Check the extra tokens.
269 TestFileIter = TestFile.SourceListTokens.find(0);
270 ASSERT_NE(TestFile.SourceListTokens.end(), TestFileIter);
271 ASSERT_EQ("STATUS=FEED", TestFileIter->second);
273 // Start with the home source address.
275 TestFileIter = TestFile.SourceList.find(1);
276 ASSERT_NE(TestFile.SourceList.end(), TestFileIter);
277 ASSERT_EQ("http://example.com/source/sourceb.vcf", TestFileIter->second);
279 // Check the TYPE section.
281 TestFileIter = TestFile.SourceListType.find(1);
282 ASSERT_NE(TestFile.SourceListType.end(), TestFileIter);
283 ASSERT_EQ("home", TestFileIter->second);
285 // Check the ALTID section.
287 TestFileIter = TestFile.SourceListAltID.find(1);
288 ASSERT_NE(TestFile.SourceListAltID.end(), TestFileIter);
289 ASSERT_EQ("84", TestFileIter->second);
291 // Check the PID section.
293 TestFileIter = TestFile.SourceListPID.find(1);
294 ASSERT_NE(TestFile.SourceListPID.end(), TestFileIter);
295 ASSERT_EQ("81", TestFileIter->second);
297 // Check the MEDIATYPE section.
299 TestFileIter = TestFile.SourceListMediatype.find(1);
300 ASSERT_NE(TestFile.SourceListMediatype.end(), TestFileIter);
301 ASSERT_EQ("text/plainpaper", TestFileIter->second);
303 // Check the PREF section.
305 TestFileIntIter = TestFile.SourceListPref.find(1);
306 ASSERT_NE(TestFile.SourceListPref.end(), TestFileIntIter);
307 ASSERT_EQ(82, TestFileIntIter->second);
309 // Check the extra tokens.
311 TestFileIter = TestFile.SourceListTokens.find(1);
312 ASSERT_NE(TestFile.SourceListTokens.end(), TestFileIter);
313 ASSERT_EQ("STATUS=ONLINE", TestFileIter->second);
315 // Start with the home source address.
317 TestFileIter = TestFile.SourceList.find(2);
318 ASSERT_NE(TestFile.SourceList.end(), TestFileIter);
319 ASSERT_EQ("http://example.com/source/sourcec.vcf", TestFileIter->second);
321 // Check the TYPE section.
323 TestFileIter = TestFile.SourceListType.find(2);
324 ASSERT_NE(TestFile.SourceListType.end(), TestFileIter);
325 ASSERT_EQ("work", TestFileIter->second);
327 // Check the ALTID section.
329 TestFileIter = TestFile.SourceListAltID.find(2);
330 ASSERT_NE(TestFile.SourceListAltID.end(), TestFileIter);
331 ASSERT_EQ("94", TestFileIter->second);
333 // Check the PID section.
335 TestFileIter = TestFile.SourceListPID.find(2);
336 ASSERT_NE(TestFile.SourceListPID.end(), TestFileIter);
337 ASSERT_EQ("91", TestFileIter->second);
339 // Check the MEDIATYPE section.
341 TestFileIter = TestFile.SourceListMediatype.find(2);
342 ASSERT_NE(TestFile.SourceListMediatype.end(), TestFileIter);
343 ASSERT_EQ("text/sandpaper", TestFileIter->second);
345 // Check the PREF section.
347 TestFileIntIter = TestFile.SourceListPref.find(2);
348 ASSERT_NE(TestFile.SourceListPref.end(), TestFileIntIter);
349 ASSERT_EQ(92, TestFileIntIter->second);
351 // Check the extra tokens.
353 TestFileIter = TestFile.SourceListTokens.find(2);
354 ASSERT_NE(TestFile.SourceListTokens.end(), TestFileIter);
355 ASSERT_EQ("STATUS=OFFLINE", TestFileIter->second);
359 TEST(ContactLoad, XMLTest){
361 ContactDataObject TestFile;
363 // Check that the vCard 4.0 file loads OK.
365 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
367 std::map<int,wxString>::iterator TestFileIter;
368 std::map<int,int>::iterator TestFileIntIter;
370 // Start with the first XML property.
372 // Start with a general source address.
374 TestFileIter = TestFile.XMLList.find(0);
375 ASSERT_NE(TestFile.XMLList.end(), TestFileIter);
376 ASSERT_EQ("<a xmlns=\"http://www.w3.org/1999/xhtml\"\\n"
377 " href=\"http://example.com/\">Example Page 1</a>", TestFileIter->second);
379 TestFileIter = TestFile.XMLList.find(1);
380 ASSERT_NE(TestFile.XMLList.end(), TestFileIter);
381 ASSERT_EQ("<a xmlns=\"http://www.w3.org/1999/xhtml\"\\n"
382 " href=\"http://example.com/page2.html\">Example Page 2</a>", TestFileIter->second);
384 TestFileIter = TestFile.XMLList.find(2);
385 ASSERT_NE(TestFile.XMLList.end(), TestFileIter);
386 ASSERT_EQ("<a xmlns=\"http://www.w3.org/1999/xhtml\"\\n"
387 " href=\"http://example.com/page3.html\">Example Page 3</a>", TestFileIter->second);
391 TEST(ContactLoad, NicknameTests){
393 ContactDataObject TestFile;
395 // Check that the vCard 4.0 file loads OK.
397 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
399 std::map<int,wxString>::iterator TestFileIter;
400 std::map<int,int>::iterator TestFileIntIter;
402 // Check that the nickname has been read (NICKNAME). General.
404 TestFileIter = TestFile.GeneralNicknamesList.find(0);
405 ASSERT_NE(TestFile.GeneralNicknamesList.end(), TestFileIter);
406 ASSERT_EQ("Tester", TestFileIter->second);
408 // Check the ALTID parameter.
410 TestFileIter = TestFile.GeneralNicknamesListAltID.find(0);
411 ASSERT_NE(TestFile.GeneralNicknamesListAltID.end(), TestFileIter);
412 ASSERT_EQ("35", TestFileIter->second);
414 // Check the PID parameter.
416 TestFileIter = TestFile.GeneralNicknamesListPID.find(0);
417 ASSERT_NE(TestFile.GeneralNicknamesListPID.end(), TestFileIter);
418 ASSERT_EQ("50", TestFileIter->second);
420 // Check the PREF parameter.
422 TestFileIntIter = TestFile.GeneralNicknamesListPref.find(0);
423 ASSERT_NE(TestFile.GeneralNicknamesListPref.end(), TestFileIntIter);
424 ASSERT_EQ(40, TestFileIntIter->second);
426 // Check the LANGUAGE parameter.
428 TestFileIter = TestFile.GeneralNicknamesListLanguage.find(0);
429 ASSERT_NE(TestFile.GeneralNicknamesListLanguage.end(), TestFileIter);
430 ASSERT_EQ("kw", TestFileIter->second);
432 // Check the extra tokens parameter.
434 TestFileIter = TestFile.GeneralNicknamesListTokens.find(0);
435 ASSERT_NE(TestFile.GeneralNicknamesListTokens.end(), TestFileIter);
436 ASSERT_EQ("YAY=Nope;Beep=Boop", TestFileIter->second);
438 // Repeat for the home type.
440 TestFileIter = TestFile.HomeNicknamesList.find(1);
441 ASSERT_NE(TestFile.HomeNicknamesList.end(), TestFileIter);
442 ASSERT_EQ("Testy", TestFileIter->second);
444 // Check the ALTID parameter.
446 TestFileIter = TestFile.HomeNicknamesListAltID.find(1);
447 ASSERT_NE(TestFile.HomeNicknamesListAltID.end(), TestFileIter);
448 ASSERT_EQ("17", TestFileIter->second);
450 // Check the PID parameter.
452 TestFileIter = TestFile.HomeNicknamesListPID.find(1);
453 ASSERT_NE(TestFile.HomeNicknamesListPID.end(), TestFileIter);
454 ASSERT_EQ("39", TestFileIter->second);
456 // Check the PREF parameter.
458 TestFileIntIter = TestFile.HomeNicknamesListPref.find(1);
459 ASSERT_NE(TestFile.HomeNicknamesListPref.end(), TestFileIntIter);
460 ASSERT_EQ(78, TestFileIntIter->second);
462 // Check the LANGUAGE parameter.
464 TestFileIter = TestFile.HomeNicknamesListLanguage.find(1);
465 ASSERT_NE(TestFile.HomeNicknamesListLanguage.end(), TestFileIter);
466 ASSERT_EQ("en", TestFileIter->second);
468 // Check the extra tokens parameter.
470 TestFileIter = TestFile.HomeNicknamesListTokens.find(1);
471 ASSERT_NE(TestFile.HomeNicknamesListTokens.end(), TestFileIter);
472 ASSERT_EQ("YAY=Yep;Beep=Boop", TestFileIter->second);
474 // Repeat for the work type.
476 TestFileIter = TestFile.BusinessNicknamesList.find(2);
477 ASSERT_NE(TestFile.BusinessNicknamesList.end(), TestFileIter);
478 ASSERT_EQ("The Testing One", TestFileIter->second);
480 // Check the ALTID parameter.
482 TestFileIter = TestFile.BusinessNicknamesListAltID.find(2);
483 ASSERT_NE(TestFile.BusinessNicknamesListAltID.end(), TestFileIter);
484 ASSERT_EQ("99", TestFileIter->second);
486 // Check the PID parameter.
488 TestFileIter = TestFile.BusinessNicknamesListPID.find(2);
489 ASSERT_NE(TestFile.BusinessNicknamesListPID.end(), TestFileIter);
490 ASSERT_EQ("10", TestFileIter->second);
492 // Check the PREF parameter.
494 TestFileIntIter = TestFile.BusinessNicknamesListPref.find(2);
495 ASSERT_NE(TestFile.BusinessNicknamesListPref.end(), TestFileIntIter);
496 ASSERT_EQ(1, TestFileIntIter->second);
498 // Check the LANGUAGE parameter.
500 TestFileIter = TestFile.BusinessNicknamesListLanguage.find(2);
501 ASSERT_NE(TestFile.BusinessNicknamesListLanguage.end(), TestFileIter);
502 ASSERT_EQ("en-GB", TestFileIter->second);
504 // Check the extra tokens parameter.
506 TestFileIter = TestFile.BusinessNicknamesListTokens.find(2);
507 ASSERT_NE(TestFile.BusinessNicknamesListTokens.end(), TestFileIter);
508 ASSERT_EQ("YAY=Maybe;Boop=Boing", TestFileIter->second);
512 TEST(ContactLoad, GenderTests){
514 // Check that the gender has been read.
516 ContactDataObject TestFile;
518 // Check that the vCard 4.0 file loads OK.
520 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
522 std::map<int,wxString>::iterator TestFileIter;
523 std::map<int,int>::iterator TestFileIntIter;
525 ASSERT_NE("", TestFile.Gender);
526 ASSERT_EQ("F", TestFile.Gender);
527 ASSERT_EQ("Example Text", TestFile.GenderDetails);
528 ASSERT_EQ("BEEP=Boop", TestFile.GenderTokens);
532 TEST(ContactLoad, BirthdayTests){
534 // Check that the birthday has been read.
536 ContactDataObject TestFile;
538 // Check that the vCard 4.0 file loads OK.
540 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
542 std::map<int,wxString>::iterator TestFileIter;
543 std::map<int,int>::iterator TestFileIntIter;
545 ASSERT_NE("", TestFile.Birthday);
546 ASSERT_EQ("20040101", TestFile.Birthday);
548 // Check the ALTID parameter.
550 ASSERT_EQ("35", TestFile.BirthdayAltID);
552 // Check the CALSCALE parameter.
554 ASSERT_EQ("georgian", TestFile.BirthdayCalScale);
556 // Check the extra tokens parameter.
558 ASSERT_EQ("HAPPY=Days", TestFile.BirthdayTokens);
560 // Check the VALUE parameter. (Note have to use a different file
561 // due to the *1 rule in RFC6350.
563 ContactDataObject TestFileValue;
564 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4-BDayValue.vcf"));
566 ASSERT_EQ("Circa 2000s", TestFile.Birthday);
570 TEST(ContactLoad, AnniversaryTests){
572 // Check that the anniversary has been read.
574 ContactDataObject TestFile;
576 // Check that the vCard 4.0 file loads OK.
578 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
580 std::map<int,wxString>::iterator TestFileIter;
581 std::map<int,int>::iterator TestFileIntIter;
583 ASSERT_NE("", TestFile.Anniversary);
584 ASSERT_EQ("20200516", TestFile.Anniversary);
586 // Check the ALTID parameter.
588 ASSERT_EQ("70", TestFile.AnniversaryAltID);
590 // Check the CALSCALE parameter.
592 ASSERT_EQ("georgian", TestFile.AnniversaryCalScale);
594 // Check the extra tokens parameter.
596 ASSERT_EQ("WONDERFUL=Day", TestFile.AnniversaryTokens);
598 // Check the VALUE parameter. (Note have to use a different file
599 // due to the *1 rule in RFC6350.
601 ContactDataObject TestFileValue;
602 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4-BDayValue.vcf"));
604 ASSERT_EQ("Circa 2020s", TestFile.Anniversary);
608 TEST(ContactLoad, TimeZoneTests){
610 ContactDataObject TestFile;
612 // Check that the vCard 4.0 file loads OK.
614 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
616 std::map<int,wxString>::iterator TestFileIter;
617 std::map<int,int>::iterator TestFileIntIter;
619 // Check that the timezone has been read (TZ). General.
621 TestFileIter = TestFile.GeneralTZList.find(0);
622 ASSERT_NE(TestFile.GeneralTZList.end(), TestFileIter);
623 ASSERT_EQ("Europe/Truro", TestFileIter->second);
625 // Check the ALTID parameter.
627 TestFileIter = TestFile.GeneralTZListAltID.find(0);
628 ASSERT_NE(TestFile.GeneralTZListAltID.end(), TestFileIter);
629 ASSERT_EQ("35", TestFileIter->second);
631 // Check the PID parameter.
633 TestFileIter = TestFile.GeneralTZListPID.find(0);
634 ASSERT_NE(TestFile.GeneralTZListPID.end(), TestFileIter);
635 ASSERT_EQ("60", TestFileIter->second);
637 // Check the PREF parameter.
639 TestFileIntIter = TestFile.GeneralTZListPref.find(0);
640 ASSERT_NE(TestFile.GeneralTZListPref.end(), TestFileIntIter);
641 ASSERT_EQ(20, TestFileIntIter->second);
643 // Check the LANGUAGE parameter.
645 TestFileIter = TestFile.GeneralTZListMediatype.find(0);
646 ASSERT_NE(TestFile.GeneralTZListMediatype.end(), TestFileIter);
647 ASSERT_EQ("text/plain", TestFileIter->second);
649 // Check the extra tokens parameter.
651 TestFileIter = TestFile.GeneralTZListTokens.find(0);
652 ASSERT_NE(TestFile.GeneralTZListTokens.end(), TestFileIter);
653 ASSERT_EQ("WHATS=This;A=Potato", TestFileIter->second);
655 // Check that the timezone has been read (TZ). Home.
657 TestFileIter = TestFile.HomeTZList.find(1);
658 ASSERT_NE(TestFile.HomeTZList.end(), TestFileIter);
659 ASSERT_EQ("Europe/Penzance", TestFileIter->second);
661 // Check the ALTID parameter.
663 TestFileIter = TestFile.HomeTZListAltID.find(1);
664 ASSERT_NE(TestFile.HomeTZListAltID.end(), TestFileIter);
665 ASSERT_EQ("15", TestFileIter->second);
667 // Check the PID parameter.
669 TestFileIter = TestFile.HomeTZListPID.find(1);
670 ASSERT_NE(TestFile.HomeTZListPID.end(), TestFileIter);
671 ASSERT_EQ("20", TestFileIter->second);
673 // Check the PREF parameter.
675 TestFileIntIter = TestFile.HomeTZListPref.find(1);
676 ASSERT_NE(TestFile.HomeTZListPref.end(), TestFileIntIter);
677 ASSERT_EQ(40, TestFileIntIter->second);
679 // Check the LANGUAGE parameter.
681 TestFileIter = TestFile.HomeTZListMediatype.find(1);
682 ASSERT_NE(TestFile.HomeTZListMediatype.end(), TestFileIter);
683 ASSERT_EQ("text/plain", TestFileIter->second);
685 // Check the extra tokens parameter.
687 TestFileIter = TestFile.HomeTZListTokens.find(1);
688 ASSERT_NE(TestFile.HomeTZListTokens.end(), TestFileIter);
689 ASSERT_EQ("MAYBE=not", TestFileIter->second);
691 // Check that the timezone has been read (TZ). Business.
693 TestFileIter = TestFile.BusinessTZList.find(2);
694 ASSERT_NE(TestFile.BusinessTZList.end(), TestFileIter);
695 ASSERT_EQ("Europe/St Austell", TestFileIter->second);
697 // Check the ALTID parameter.
699 TestFileIter = TestFile.BusinessTZListAltID.find(2);
700 ASSERT_NE(TestFile.BusinessTZListAltID.end(), TestFileIter);
701 ASSERT_EQ("45", TestFileIter->second);
703 // Check the PID parameter.
705 TestFileIter = TestFile.BusinessTZListPID.find(2);
706 ASSERT_NE(TestFile.BusinessTZListPID.end(), TestFileIter);
707 ASSERT_EQ("70", TestFileIter->second);
709 // Check the PREF parameter.
711 TestFileIntIter = TestFile.BusinessTZListPref.find(2);
712 ASSERT_NE(TestFile.BusinessTZListPref.end(), TestFileIntIter);
713 ASSERT_EQ(80, TestFileIntIter->second);
715 // Check the LANGUAGE parameter.
717 TestFileIter = TestFile.BusinessTZListMediatype.find(2);
718 ASSERT_NE(TestFile.BusinessTZListMediatype.end(), TestFileIter);
719 ASSERT_EQ("text/plain", TestFileIter->second);
721 // Check the extra tokens parameter.
723 TestFileIter = TestFile.BusinessTZListTokens.find(2);
724 ASSERT_NE(TestFile.BusinessTZListTokens.end(), TestFileIter);
725 ASSERT_EQ("MAYBE=yes", TestFileIter->second);
729 TEST(ContactLoad, AddressTests){
731 ContactDataObject TestFile;
733 // Check that the vCard 4.0 file loads OK.
735 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
737 std::map<int,wxString>::iterator TestFileIter;
738 std::map<int,int>::iterator TestFileIntIter;
740 // Start with the general address.
742 // Check the address street section.
744 TestFileIter = TestFile.GeneralAddressList.find(0);
745 ASSERT_NE(TestFile.GeneralAddressList.end(), TestFileIter);
746 ASSERT_EQ("1 Lovely Lane", TestFileIter->second);
748 // Check the address town section.
750 TestFileIter = TestFile.GeneralAddressListTown.find(0);
751 ASSERT_NE(TestFile.GeneralAddressListTown.end(), TestFileIter);
752 ASSERT_EQ("Rodney", TestFileIter->second);
754 // Check the address county section.
756 TestFileIter = TestFile.GeneralAddressListCounty.find(0);
757 ASSERT_NE(TestFile.GeneralAddressListCounty.end(), TestFileIter);
758 ASSERT_EQ("Cornwall", TestFileIter->second);
760 // Check the address post code section.
762 TestFileIter = TestFile.GeneralAddressListPostCode.find(0);
763 ASSERT_NE(TestFile.GeneralAddressListPostCode.end(), TestFileIter);
764 ASSERT_EQ("PL99 1AA", TestFileIter->second);
766 // Check the address country section.
768 TestFileIter = TestFile.GeneralAddressListCountry.find(0);
769 ASSERT_NE(TestFile.GeneralAddressListCountry.end(), TestFileIter);
770 ASSERT_EQ("United Kingdom", TestFileIter->second);
772 // Check the LABEL section.
774 TestFileIter = TestFile.GeneralAddressListLabel.find(0);
775 ASSERT_NE(TestFile.GeneralAddressListLabel.end(), TestFileIter);
776 ASSERT_EQ("\"1 Lovely Lane\nRodney\nCornwall\nPL99 1AA\nCornwall\nUnited Kingdom\"", TestFileIter->second);
778 // Check the LANGUAGE section.
780 TestFileIter = TestFile.GeneralAddressListLang.find(0);
781 ASSERT_NE(TestFile.GeneralAddressListLang.end(), TestFileIter);
782 ASSERT_EQ("kw", TestFileIter->second);
784 // Check the ALTID section.
786 TestFileIter = TestFile.GeneralAddressListAltID.find(0);
787 ASSERT_NE(TestFile.GeneralAddressListAltID.end(), TestFileIter);
788 ASSERT_EQ("15", TestFileIter->second);
790 // Check the PID section.
792 TestFileIter = TestFile.GeneralAddressListPID.find(0);
793 ASSERT_NE(TestFile.GeneralAddressListPID.end(), TestFileIter);
794 ASSERT_EQ("81", TestFileIter->second);
796 // Check the GEO section.
798 TestFileIter = TestFile.GeneralAddressListGeo.find(0);
799 ASSERT_NE(TestFile.GeneralAddressListGeo.end(), TestFileIter);
800 ASSERT_EQ("geo:1.0, 1.0", TestFileIter->second);
802 // Check the TZ section.
804 TestFileIter = TestFile.GeneralAddressListTimezone.find(0);
805 ASSERT_NE(TestFile.GeneralAddressListTimezone.end(), TestFileIter);
806 ASSERT_EQ("Europe/Truro", TestFileIter->second);
808 // Check the MEDIATYPE section.
810 TestFileIter = TestFile.GeneralAddressListMediatype.find(0);
811 ASSERT_NE(TestFile.GeneralAddressListMediatype.end(), TestFileIter);
812 ASSERT_EQ("text/plain", TestFileIter->second);
814 // Check the PREF section.
816 TestFileIntIter = TestFile.GeneralAddressListPref.find(0);
817 ASSERT_NE(TestFile.GeneralAddressListPref.end(), TestFileIntIter);
818 ASSERT_EQ(98, TestFileIntIter->second);
820 // Check the extra tokens.
822 TestFileIter = TestFile.GeneralAddressListTokens.find(0);
823 ASSERT_NE(TestFile.GeneralAddressListTokens.end(), TestFileIter);
824 ASSERT_EQ("MAKES=Moo;ANIMAL=Cow", TestFileIter->second);
826 // Process the home address
828 // Check the address street section.
830 TestFileIter = TestFile.HomeAddressList.find(1);
831 ASSERT_NE(TestFile.HomeAddressList.end(), TestFileIter);
832 ASSERT_EQ("3 Working Plaice", TestFileIter->second);
834 // Check the address town section.
836 TestFileIter = TestFile.HomeAddressListTown.find(1);
837 ASSERT_NE(TestFile.HomeAddressListTown.end(), TestFileIter);
838 ASSERT_EQ("Roger", TestFileIter->second);
840 // Check the address county section.
842 TestFileIter = TestFile.HomeAddressListCounty.find(1);
843 ASSERT_NE(TestFile.HomeAddressListCounty.end(), TestFileIter);
844 ASSERT_EQ("Cornwall", TestFileIter->second);
846 // Check the address post code section.
848 TestFileIter = TestFile.HomeAddressListPostCode.find(1);
849 ASSERT_NE(TestFile.HomeAddressListPostCode.end(), TestFileIter);
850 ASSERT_EQ("PL75 4ZZ", TestFileIter->second);
852 // Check the address country section.
854 TestFileIter = TestFile.HomeAddressListCountry.find(1);
855 ASSERT_NE(TestFile.HomeAddressListCountry.end(), TestFileIter);
856 ASSERT_EQ("United Kingdom", TestFileIter->second);
858 // Check the LABEL section.
860 TestFileIter = TestFile.HomeAddressListLabel.find(1);
861 ASSERT_NE(TestFile.HomeAddressListLabel.end(), TestFileIter);
862 ASSERT_EQ("\"3 Working Plaice\nRoger\nCornwall\nPL75 4ZZ\nCornwall\nUnited Kingdom\"", TestFileIter->second);
864 // Check the LANGUAGE section.
866 TestFileIter = TestFile.HomeAddressListLang.find(1);
867 ASSERT_NE(TestFile.HomeAddressListLang.end(), TestFileIter);
868 ASSERT_EQ("en", TestFileIter->second);
870 // Check the ALTID section.
872 TestFileIter = TestFile.HomeAddressListAltID.find(1);
873 ASSERT_NE(TestFile.HomeAddressListAltID.end(), TestFileIter);
874 ASSERT_EQ("40", TestFileIter->second);
876 // Check the PID section.
878 TestFileIter = TestFile.HomeAddressListPID.find(1);
879 ASSERT_NE(TestFile.HomeAddressListPID.end(), TestFileIter);
880 ASSERT_EQ("13", TestFileIter->second);
882 // Check the GEO section.
884 TestFileIter = TestFile.HomeAddressListGeo.find(1);
885 ASSERT_NE(TestFile.HomeAddressListGeo.end(), TestFileIter);
886 ASSERT_EQ("geo:4.0, 4.0", TestFileIter->second);
888 // Check the TZ section.
890 TestFileIter = TestFile.HomeAddressListTimezone.find(1);
891 ASSERT_NE(TestFile.HomeAddressListTimezone.end(), TestFileIter);
892 ASSERT_EQ("Europe/St Ives", TestFileIter->second);
894 // Check the MEDIATYPE section.
896 TestFileIter = TestFile.HomeAddressListMediatype.find(1);
897 ASSERT_NE(TestFile.HomeAddressListMediatype.end(), TestFileIter);
898 ASSERT_EQ("text/plain", TestFileIter->second);
900 // Check the PREF section.
902 TestFileIntIter = TestFile.HomeAddressListPref.find(1);
903 ASSERT_NE(TestFile.HomeAddressListPref.end(), TestFileIntIter);
904 ASSERT_EQ(10, TestFileIntIter->second);
906 // Check the extra tokens.
908 TestFileIter = TestFile.HomeAddressListTokens.find(1);
909 ASSERT_NE(TestFile.HomeAddressListTokens.end(), TestFileIter);
910 ASSERT_EQ("TOAST=Butter", TestFileIter->second);
912 // Process the business address.
914 // Check the address street section.
916 TestFileIter = TestFile.BusinessAddressList.find(2);
917 ASSERT_NE(TestFile.BusinessAddressList.end(), TestFileIter);
918 ASSERT_EQ("7 Flyby Drive", TestFileIter->second);
920 // Check the address town section.
922 TestFileIter = TestFile.BusinessAddressListTown.find(2);
923 ASSERT_NE(TestFile.BusinessAddressListTown.end(), TestFileIter);
924 ASSERT_EQ("Elaine", TestFileIter->second);
926 // Check the address county section.
928 TestFileIter = TestFile.BusinessAddressListCounty.find(2);
929 ASSERT_NE(TestFile.BusinessAddressListCounty.end(), TestFileIter);
930 ASSERT_EQ("Cornwall", TestFileIter->second);
932 // Check the address post code section.
934 TestFileIter = TestFile.BusinessAddressListPostCode.find(2);
935 ASSERT_NE(TestFile.BusinessAddressListPostCode.end(), TestFileIter);
936 ASSERT_EQ("PL84 9YE", TestFileIter->second);
938 // Check the address country section.
940 TestFileIter = TestFile.BusinessAddressListCountry.find(2);
941 ASSERT_NE(TestFile.BusinessAddressListCountry.end(), TestFileIter);
942 ASSERT_EQ("United Kingdom", TestFileIter->second);
944 // Check the LABEL section.
946 TestFileIter = TestFile.BusinessAddressListLabel.find(2);
947 ASSERT_NE(TestFile.BusinessAddressListLabel.end(), TestFileIter);
948 ASSERT_EQ("\"7 Flyby Drive\nElaine\nCornwall\nPL84 9YE\nCornwall\nUnited Kingdom\"", TestFileIter->second);
950 // Check the LANGUAGE section.
952 TestFileIter = TestFile.BusinessAddressListLang.find(2);
953 ASSERT_NE(TestFile.BusinessAddressListLang.end(), TestFileIter);
954 ASSERT_EQ("en-GB", TestFileIter->second);
956 // Check the ALTID section.
958 TestFileIter = TestFile.BusinessAddressListAltID.find(2);
959 ASSERT_NE(TestFile.BusinessAddressListAltID.end(), TestFileIter);
960 ASSERT_EQ("45", TestFileIter->second);
962 // Check the PID section.
964 TestFileIter = TestFile.BusinessAddressListPID.find(2);
965 ASSERT_NE(TestFile.BusinessAddressListPID.end(), TestFileIter);
966 ASSERT_EQ("28", TestFileIter->second);
968 // Check the GEO section.
970 TestFileIter = TestFile.BusinessAddressListGeo.find(2);
971 ASSERT_NE(TestFile.BusinessAddressListGeo.end(), TestFileIter);
972 ASSERT_EQ("geo:7.0, 7.0", TestFileIter->second);
974 // Check the TZ section.
976 TestFileIter = TestFile.BusinessAddressListTimezone.find(2);
977 ASSERT_NE(TestFile.BusinessAddressListTimezone.end(), TestFileIter);
978 ASSERT_EQ("Europe/Newquay", TestFileIter->second);
980 // Check the MEDIATYPE section.
982 TestFileIter = TestFile.BusinessAddressListMediatype.find(2);
983 ASSERT_NE(TestFile.BusinessAddressListMediatype.end(), TestFileIter);
984 ASSERT_EQ("text/plain", TestFileIter->second);
986 // Check the PREF section.
988 TestFileIntIter = TestFile.BusinessAddressListPref.find(2);
989 ASSERT_NE(TestFile.BusinessAddressListPref.end(), TestFileIntIter);
990 ASSERT_EQ(10, TestFileIntIter->second);
992 // Check the extra tokens.
994 TestFileIter = TestFile.BusinessAddressListTokens.find(2);
995 ASSERT_NE(TestFile.BusinessAddressListTokens.end(), TestFileIter);
996 ASSERT_EQ("JAM=Red", TestFileIter->second);
1001 TEST(ContactLoad, EmailTests){
1003 ContactDataObject TestFile;
1005 // Check that the vCard 4.0 file loads OK.
1007 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1009 std::map<int,wxString>::iterator TestFileIter;
1010 std::map<int,int>::iterator TestFileIntIter;
1012 // Start with the general email.
1014 TestFileIter = TestFile.GeneralEmailList.find(0);
1015 ASSERT_NE(TestFile.GeneralEmailList.end(), TestFileIter);
1016 ASSERT_EQ("moo@example.com", TestFileIter->second);
1018 // Check the ALTID section.
1020 TestFileIter = TestFile.GeneralEmailListAltID.find(0);
1021 ASSERT_NE(TestFile.GeneralEmailListAltID.end(), TestFileIter);
1022 ASSERT_EQ("10", TestFileIter->second);
1024 // Check the PID section.
1026 TestFileIter = TestFile.GeneralEmailListPID.find(0);
1027 ASSERT_NE(TestFile.GeneralEmailListPID.end(), TestFileIter);
1028 ASSERT_EQ("20", TestFileIter->second);
1030 // Check the PREF section.
1032 TestFileIntIter = TestFile.GeneralEmailListPref.find(0);
1033 ASSERT_NE(TestFile.GeneralEmailListPref.end(), TestFileIntIter);
1034 ASSERT_EQ(40, TestFileIntIter->second);
1036 // Check the extra tokens.
1038 TestFileIter = TestFile.GeneralEmailListTokens.find(0);
1039 ASSERT_NE(TestFile.GeneralEmailListTokens.end(), TestFileIter);
1040 ASSERT_EQ("WONDERFUL=Colour", TestFileIter->second);
1042 // Start with the home email.
1044 TestFileIter = TestFile.HomeEmailList.find(1);
1045 ASSERT_NE(TestFile.HomeEmailList.end(), TestFileIter);
1046 ASSERT_EQ("moo.home@example.com", TestFileIter->second);
1048 // Check the ALTID section.
1050 TestFileIter = TestFile.HomeEmailListAltID.find(1);
1051 ASSERT_NE(TestFile.HomeEmailListAltID.end(), TestFileIter);
1052 ASSERT_EQ("5", TestFileIter->second);
1054 // Check the PID section.
1056 TestFileIter = TestFile.HomeEmailListPID.find(1);
1057 ASSERT_NE(TestFile.HomeEmailListPID.end(), TestFileIter);
1058 ASSERT_EQ("10", TestFileIter->second);
1060 // Check the PREF section.
1062 TestFileIntIter = TestFile.HomeEmailListPref.find(1);
1063 ASSERT_NE(TestFile.HomeEmailListPref.end(), TestFileIntIter);
1064 ASSERT_EQ(20, TestFileIntIter->second);
1066 // Check the extra tokens.
1068 TestFileIter = TestFile.HomeEmailListTokens.find(1);
1069 ASSERT_NE(TestFile.HomeEmailListTokens.end(), TestFileIter);
1070 ASSERT_EQ("PEACE=quiet", TestFileIter->second);
1072 // Start with the business email.
1074 TestFileIter = TestFile.BusinessEmailList.find(2);
1075 ASSERT_NE(TestFile.BusinessEmailList.end(), TestFileIter);
1076 ASSERT_EQ("moo.business@example.com", TestFileIter->second);
1078 // Check the ALTID section.
1080 TestFileIter = TestFile.BusinessEmailListAltID.find(2);
1081 ASSERT_NE(TestFile.BusinessEmailListAltID.end(), TestFileIter);
1082 ASSERT_EQ("1", TestFileIter->second);
1084 // Check the PID section.
1086 TestFileIter = TestFile.BusinessEmailListPID.find(2);
1087 ASSERT_NE(TestFile.BusinessEmailListPID.end(), TestFileIter);
1088 ASSERT_EQ("2", TestFileIter->second);
1090 // Check the PREF section.
1092 TestFileIntIter = TestFile.BusinessEmailListPref.find(2);
1093 ASSERT_NE(TestFile.BusinessEmailListPref.end(), TestFileIntIter);
1094 ASSERT_EQ(3, TestFileIntIter->second);
1096 // Check the extra tokens.
1098 TestFileIter = TestFile.BusinessEmailListTokens.find(2);
1099 ASSERT_NE(TestFile.BusinessEmailListTokens.end(), TestFileIter);
1100 ASSERT_EQ("BUSINESS=Money", TestFileIter->second);
1104 TEST(ContactLoad, IMTests){
1106 ContactDataObject TestFile;
1108 // Check that the vCard 4.0 file loads OK.
1110 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1112 std::map<int,wxString>::iterator TestFileIter;
1113 std::map<int,int>::iterator TestFileIntIter;
1115 // Start with the general IM.
1117 TestFileIter = TestFile.GeneralIMList.find(0);
1118 ASSERT_NE(TestFile.GeneralIMList.end(), TestFileIter);
1119 ASSERT_EQ("moo@example.com", TestFileIter->second);
1121 // Check the ALTID section.
1123 TestFileIter = TestFile.GeneralIMListAltID.find(0);
1124 ASSERT_NE(TestFile.GeneralIMListAltID.end(), TestFileIter);
1125 ASSERT_EQ("10", TestFileIter->second);
1127 // Check the PID section.
1129 TestFileIter = TestFile.GeneralIMListPID.find(0);
1130 ASSERT_NE(TestFile.GeneralIMListPID.end(), TestFileIter);
1131 ASSERT_EQ("20", TestFileIter->second);
1133 // Check the MEDIATYPE section.
1135 TestFileIter = TestFile.GeneralIMListMediatype.find(0);
1136 ASSERT_NE(TestFile.GeneralIMListMediatype.end(), TestFileIter);
1137 ASSERT_EQ("text/plain", TestFileIter->second);
1139 // Check the PREF section.
1141 TestFileIntIter = TestFile.GeneralIMListPref.find(0);
1142 ASSERT_NE(TestFile.GeneralIMListPref.end(), TestFileIntIter);
1143 ASSERT_EQ(40, TestFileIntIter->second);
1145 // Check the extra tokens.
1147 TestFileIter = TestFile.GeneralIMListTokens.find(0);
1148 ASSERT_NE(TestFile.GeneralIMListTokens.end(), TestFileIter);
1149 ASSERT_EQ("WONDERFUL=Colour", TestFileIter->second);
1151 // Start with the home IM.
1153 TestFileIter = TestFile.HomeIMList.find(1);
1154 ASSERT_NE(TestFile.HomeIMList.end(), TestFileIter);
1155 ASSERT_EQ("moo.home@example.com", TestFileIter->second);
1157 // Check the ALTID section.
1159 TestFileIter = TestFile.HomeIMListAltID.find(1);
1160 ASSERT_NE(TestFile.HomeIMListAltID.end(), TestFileIter);
1161 ASSERT_EQ("20", TestFileIter->second);
1163 // Check the PID section.
1165 TestFileIter = TestFile.HomeIMListPID.find(1);
1166 ASSERT_NE(TestFile.HomeIMListPID.end(), TestFileIter);
1167 ASSERT_EQ("40", TestFileIter->second);
1169 // Check the MEDIATYPE section.
1171 TestFileIter = TestFile.HomeIMListMediatype.find(1);
1172 ASSERT_NE(TestFile.HomeIMListMediatype.end(), TestFileIter);
1173 ASSERT_EQ("text/reallyplain", TestFileIter->second);
1175 // Check the PREF section.
1177 TestFileIntIter = TestFile.HomeIMListPref.find(1);
1178 ASSERT_NE(TestFile.HomeIMListPref.end(), TestFileIntIter);
1179 ASSERT_EQ(80, TestFileIntIter->second);
1181 // Check the extra tokens.
1183 TestFileIter = TestFile.HomeIMListTokens.find(1);
1184 ASSERT_NE(TestFile.HomeIMListTokens.end(), TestFileIter);
1185 ASSERT_EQ("PEACE=quiet", TestFileIter->second);
1187 // Start with the business IM.
1189 TestFileIter = TestFile.BusinessIMList.find(2);
1190 ASSERT_NE(TestFile.BusinessIMList.end(), TestFileIter);
1191 ASSERT_EQ("moo.business@example.com", TestFileIter->second);
1193 // Check the ALTID section.
1195 TestFileIter = TestFile.BusinessIMListAltID.find(2);
1196 ASSERT_NE(TestFile.BusinessIMListAltID.end(), TestFileIter);
1197 ASSERT_EQ("98", TestFileIter->second);
1199 // Check the PID section.
1201 TestFileIter = TestFile.BusinessIMListPID.find(2);
1202 ASSERT_NE(TestFile.BusinessIMListPID.end(), TestFileIter);
1203 ASSERT_EQ("99", TestFileIter->second);
1205 // Check the MEDIATYPE section.
1207 TestFileIter = TestFile.BusinessIMListMediatype.find(2);
1208 ASSERT_NE(TestFile.BusinessIMListMediatype.end(), TestFileIter);
1209 ASSERT_EQ("text/superplain", TestFileIter->second);
1211 // Check the PREF section.
1213 TestFileIntIter = TestFile.BusinessIMListPref.find(2);
1214 ASSERT_NE(TestFile.BusinessIMListPref.end(), TestFileIntIter);
1215 ASSERT_EQ(50, TestFileIntIter->second);
1217 // Check the extra tokens.
1219 TestFileIter = TestFile.BusinessIMListTokens.find(2);
1220 ASSERT_NE(TestFile.BusinessIMListTokens.end(), TestFileIter);
1221 ASSERT_EQ("BUSINESS=Money", TestFileIter->second);
1225 TEST(ContactLoad, TelephoneTests){
1227 ContactDataObject TestFile;
1229 // Check that the vCard 4.0 file loads OK.
1231 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1233 std::map<int,wxString>::iterator TestFileIter;
1234 std::map<int,int>::iterator TestFileIntIter;
1236 // Start with the general Telephone.
1238 TestFileIter = TestFile.GeneralTelephoneList.find(0);
1239 ASSERT_NE(TestFile.GeneralTelephoneList.end(), TestFileIter);
1240 ASSERT_EQ("00000000", TestFileIter->second);
1242 // Check the data type section.
1244 TestFileIter = TestFile.GeneralTelephoneListDataType.find(0);
1245 ASSERT_NE(TestFile.GeneralTelephoneListDataType.end(), TestFileIter);
1246 ASSERT_EQ("tel", TestFileIter->second);
1248 // Check the type section.
1250 TestFileIter = TestFile.GeneralTelephoneListTypeInfo.find(0);
1251 ASSERT_NE(TestFile.GeneralTelephoneListTypeInfo.end(), TestFileIter);
1252 ASSERT_EQ("fax,cell", TestFileIter->second.ToStdString());
1254 // Check the ALTID section.
1256 TestFileIter = TestFile.GeneralTelephoneListAltID.find(0);
1257 ASSERT_NE(TestFile.GeneralTelephoneListAltID.end(), TestFileIter);
1258 ASSERT_EQ("10", TestFileIter->second);
1260 // Check the PID section.
1262 TestFileIter = TestFile.GeneralTelephoneListPID.find(0);
1263 ASSERT_NE(TestFile.GeneralTelephoneListPID.end(), TestFileIter);
1264 ASSERT_EQ("20", TestFileIter->second);
1266 // Check the PREF section.
1268 TestFileIntIter = TestFile.GeneralTelephoneListPref.find(0);
1269 ASSERT_NE(TestFile.GeneralTelephoneListPref.end(), TestFileIntIter);
1270 ASSERT_EQ(40, TestFileIntIter->second);
1272 // Check the extra tokens.
1274 TestFileIter = TestFile.GeneralTelephoneListTokens.find(0);
1275 ASSERT_NE(TestFile.GeneralTelephoneListTokens.end(), TestFileIter);
1276 ASSERT_EQ("WONDERFUL=Colour", TestFileIter->second);
1278 // Start with the home Telephone.
1280 TestFileIter = TestFile.HomeTelephoneList.find(1);
1281 ASSERT_NE(TestFile.HomeTelephoneList.end(), TestFileIter);
1282 ASSERT_EQ("00001111", TestFileIter->second);
1284 // Check the data type section.
1286 TestFileIter = TestFile.HomeTelephoneListDataType.find(1);
1287 ASSERT_NE(TestFile.HomeTelephoneListDataType.end(), TestFileIter);
1288 ASSERT_EQ("tel", TestFileIter->second);
1290 // Check the type section.
1292 TestFileIter = TestFile.HomeTelephoneListTypeInfo.find(1);
1293 ASSERT_NE(TestFile.HomeTelephoneListTypeInfo.end(), TestFileIter);
1294 ASSERT_EQ("fax", TestFileIter->second);
1296 // Check the ALTID section.
1298 TestFileIter = TestFile.HomeTelephoneListAltID.find(1);
1299 ASSERT_NE(TestFile.HomeTelephoneListAltID.end(), TestFileIter);
1300 ASSERT_EQ("10", TestFileIter->second);
1302 // Check the PID section.
1304 TestFileIter = TestFile.HomeTelephoneListPID.find(1);
1305 ASSERT_NE(TestFile.HomeTelephoneListPID.end(), TestFileIter);
1306 ASSERT_EQ("20", TestFileIter->second);
1308 // Check the PREF section.
1310 TestFileIntIter = TestFile.HomeTelephoneListPref.find(1);
1311 ASSERT_NE(TestFile.HomeTelephoneListPref.end(), TestFileIntIter);
1312 ASSERT_EQ(40, TestFileIntIter->second);
1314 // Check the extra tokens.
1316 TestFileIter = TestFile.HomeTelephoneListTokens.find(1);
1317 ASSERT_NE(TestFile.HomeTelephoneListTokens.end(), TestFileIter);
1318 ASSERT_EQ("BUSINESS=Money", TestFileIter->second);
1320 // Start with the business Telephone.
1322 TestFileIter = TestFile.BusinessTelephoneList.find(2);
1323 ASSERT_NE(TestFile.BusinessTelephoneList.end(), TestFileIter);
1324 ASSERT_EQ("22221111", TestFileIter->second);
1326 // Check the data type section.
1328 TestFileIter = TestFile.BusinessTelephoneListDataType.find(2);
1329 ASSERT_NE(TestFile.BusinessTelephoneListDataType.end(), TestFileIter);
1330 ASSERT_EQ("tel", TestFileIter->second);
1332 // Check the type section.
1334 TestFileIter = TestFile.BusinessTelephoneListTypeInfo.find(2);
1335 ASSERT_NE(TestFile.BusinessTelephoneListTypeInfo.end(), TestFileIter);
1336 ASSERT_EQ("voice", TestFileIter->second);
1338 // Check the ALTID section.
1340 TestFileIter = TestFile.BusinessTelephoneListAltID.find(2);
1341 ASSERT_NE(TestFile.BusinessTelephoneListAltID.end(), TestFileIter);
1342 ASSERT_EQ("25", TestFileIter->second);
1344 // Check the PID section.
1346 TestFileIter = TestFile.BusinessTelephoneListPID.find(2);
1347 ASSERT_NE(TestFile.BusinessTelephoneListPID.end(), TestFileIter);
1348 ASSERT_EQ("50", TestFileIter->second);
1350 // Check the PREF section.
1352 TestFileIntIter = TestFile.BusinessTelephoneListPref.find(2);
1353 ASSERT_NE(TestFile.BusinessTelephoneListPref.end(), TestFileIntIter);
1354 ASSERT_EQ(75, TestFileIntIter->second);
1356 // Check the extra tokens.
1358 TestFileIter = TestFile.BusinessTelephoneListTokens.find(2);
1359 ASSERT_NE(TestFile.BusinessTelephoneListTokens.end(), TestFileIter);
1360 ASSERT_EQ("BEEP=Boop", TestFileIter->second);
1364 TEST(ContactLoad, LanguageTests){
1366 ContactDataObject TestFile;
1368 // Check that the vCard 4.0 file loads OK.
1370 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1372 std::map<int,wxString>::iterator TestFileIter;
1373 std::map<int,int>::iterator TestFileIntIter;
1375 // Start with the general language.
1377 TestFileIter = TestFile.GeneralLanguageList.find(0);
1378 ASSERT_NE(TestFile.GeneralLanguageList.end(), TestFileIter);
1379 ASSERT_EQ("kw", TestFileIter->second);
1381 // Check the ALTID section.
1383 TestFileIter = TestFile.GeneralLanguageListAltID.find(0);
1384 ASSERT_NE(TestFile.GeneralLanguageListAltID.end(), TestFileIter);
1385 ASSERT_EQ("20", TestFileIter->second);
1387 // Check the PID section.
1389 TestFileIter = TestFile.GeneralLanguageListPID.find(0);
1390 ASSERT_NE(TestFile.GeneralLanguageListPID.end(), TestFileIter);
1391 ASSERT_EQ("40", TestFileIter->second);
1393 // Check the PREF section.
1395 TestFileIntIter = TestFile.GeneralLanguageListPref.find(0);
1396 ASSERT_NE(TestFile.GeneralLanguageListPref.end(), TestFileIntIter);
1397 ASSERT_EQ(80, TestFileIntIter->second);
1399 // Check the extra tokens.
1401 TestFileIter = TestFile.GeneralLanguageListTokens.find(0);
1402 ASSERT_NE(TestFile.GeneralLanguageListTokens.end(), TestFileIter);
1403 ASSERT_EQ("GELFORN=Great", TestFileIter->second);
1405 // Start with the home language.
1407 TestFileIter = TestFile.HomeLanguageList.find(1);
1408 ASSERT_NE(TestFile.HomeLanguageList.end(), TestFileIter);
1409 ASSERT_EQ("en", TestFileIter->second);
1411 // Check the ALTID section.
1413 TestFileIter = TestFile.HomeLanguageListAltID.find(1);
1414 ASSERT_NE(TestFile.HomeLanguageListAltID.end(), TestFileIter);
1415 ASSERT_EQ("22", TestFileIter->second);
1417 // Check the PID section.
1419 TestFileIter = TestFile.HomeLanguageListPID.find(1);
1420 ASSERT_NE(TestFile.HomeLanguageListPID.end(), TestFileIter);
1421 ASSERT_EQ("45", TestFileIter->second);
1423 // Check the PREF section.
1425 TestFileIntIter = TestFile.HomeLanguageListPref.find(1);
1426 ASSERT_NE(TestFile.HomeLanguageListPref.end(), TestFileIntIter);
1427 ASSERT_EQ(90, TestFileIntIter->second);
1429 // Check the extra tokens.
1431 TestFileIter = TestFile.HomeLanguageListTokens.find(1);
1432 ASSERT_NE(TestFile.HomeLanguageListTokens.end(), TestFileIter);
1433 ASSERT_EQ("LANGUAGE=yes", TestFileIter->second);
1435 // Start with the business language.
1437 TestFileIter = TestFile.BusinessLanguageList.find(2);
1438 ASSERT_NE(TestFile.BusinessLanguageList.end(), TestFileIter);
1439 ASSERT_EQ("cy", TestFileIter->second);
1441 // Check the ALTID section.
1443 TestFileIter = TestFile.BusinessLanguageListAltID.find(2);
1444 ASSERT_NE(TestFile.BusinessLanguageListAltID.end(), TestFileIter);
1445 ASSERT_EQ("10", TestFileIter->second);
1447 // Check the PID section.
1449 TestFileIter = TestFile.BusinessLanguageListPID.find(2);
1450 ASSERT_NE(TestFile.BusinessLanguageListPID.end(), TestFileIter);
1451 ASSERT_EQ("15", TestFileIter->second);
1453 // Check the PREF section.
1455 TestFileIntIter = TestFile.BusinessLanguageListPref.find(2);
1456 ASSERT_NE(TestFile.BusinessLanguageListPref.end(), TestFileIntIter);
1457 ASSERT_EQ(20, TestFileIntIter->second);
1459 // Check the extra tokens.
1461 TestFileIter = TestFile.BusinessLanguageListTokens.find(2);
1462 ASSERT_NE(TestFile.BusinessLanguageListTokens.end(), TestFileIter);
1463 ASSERT_EQ("FFENSTRI=ie", TestFileIter->second);
1467 TEST(ContactLoad, GeographicTests){
1469 ContactDataObject TestFile;
1471 // Check that the vCard 4.0 file loads OK.
1473 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1475 std::map<int,wxString>::iterator TestFileIter;
1476 std::map<int,int>::iterator TestFileIntIter;
1478 // Start with the general Geoposition.
1480 TestFileIter = TestFile.GeneralGeographyList.find(0);
1481 ASSERT_NE(TestFile.GeneralGeographyList.end(), TestFileIter);
1482 ASSERT_EQ("3.5,3.5", TestFileIter->second);
1484 // Check the ALTID section.
1486 TestFileIter = TestFile.GeneralGeographyListAltID.find(0);
1487 ASSERT_NE(TestFile.GeneralGeographyListAltID.end(), TestFileIter);
1488 ASSERT_EQ("13", TestFileIter->second);
1490 // Check the PID section.
1492 TestFileIter = TestFile.GeneralGeographyListPID.find(0);
1493 ASSERT_NE(TestFile.GeneralGeographyListPID.end(), TestFileIter);
1494 ASSERT_EQ("26", TestFileIter->second);
1496 // Check the MEDIATYPE section.
1498 TestFileIter = TestFile.GeneralGeographyListMediatype.find(0);
1499 ASSERT_NE(TestFile.GeneralGeographyListMediatype.end(), TestFileIter);
1500 ASSERT_EQ("text/plain", TestFileIter->second);
1502 // Check the PREF section.
1504 TestFileIntIter = TestFile.GeneralGeographyListPref.find(0);
1505 ASSERT_NE(TestFile.GeneralGeographyListPref.end(), TestFileIntIter);
1506 ASSERT_EQ(39, TestFileIntIter->second);
1508 // Check the extra tokens.
1510 TestFileIter = TestFile.GeneralGeographyListTokens.find(0);
1511 ASSERT_NE(TestFile.GeneralGeographyListTokens.end(), TestFileIter);
1512 ASSERT_EQ("POS=Yep", TestFileIter->second);
1514 // Start with the home Geoposition.
1516 TestFileIter = TestFile.HomeGeographyList.find(1);
1517 ASSERT_NE(TestFile.HomeGeographyList.end(), TestFileIter);
1518 ASSERT_EQ("7.0,7.0", TestFileIter->second);
1520 // Check the ALTID section.
1522 TestFileIter = TestFile.HomeGeographyListAltID.find(1);
1523 ASSERT_NE(TestFile.HomeGeographyListAltID.end(), TestFileIter);
1524 ASSERT_EQ("140", TestFileIter->second);
1526 // Check the PID section.
1528 TestFileIter = TestFile.HomeGeographyListPID.find(1);
1529 ASSERT_NE(TestFile.HomeGeographyListPID.end(), TestFileIter);
1530 ASSERT_EQ("70", TestFileIter->second);
1532 // Check the MEDIATYPE section.
1534 TestFileIter = TestFile.HomeGeographyListMediatype.find(1);
1535 ASSERT_NE(TestFile.HomeGeographyListMediatype.end(), TestFileIter);
1536 ASSERT_EQ("text/ratherplain", TestFileIter->second);
1538 // Check the PREF section.
1540 TestFileIntIter = TestFile.HomeGeographyListPref.find(1);
1541 ASSERT_NE(TestFile.HomeGeographyListPref.end(), TestFileIntIter);
1542 ASSERT_EQ(1, TestFileIntIter->second);
1544 // Check the extra tokens.
1546 TestFileIter = TestFile.HomeGeographyListTokens.find(1);
1547 ASSERT_NE(TestFile.HomeGeographyListTokens.end(), TestFileIter);
1548 ASSERT_EQ("POS=Nope", TestFileIter->second);
1550 // Start with the business Geoposition.
1552 TestFileIter = TestFile.BusinessGeographyList.find(2);
1553 ASSERT_NE(TestFile.BusinessGeographyList.end(), TestFileIter);
1554 ASSERT_EQ("14.0,14.0", TestFileIter->second);
1556 // Check the ALTID section.
1558 TestFileIter = TestFile.BusinessGeographyListAltID.find(2);
1559 ASSERT_NE(TestFile.BusinessGeographyListAltID.end(), TestFileIter);
1560 ASSERT_EQ("75", TestFileIter->second);
1562 // Check the PID section.
1564 TestFileIter = TestFile.BusinessGeographyListPID.find(2);
1565 ASSERT_NE(TestFile.BusinessGeographyListPID.end(), TestFileIter);
1566 ASSERT_EQ("32", TestFileIter->second);
1568 // Check the MEDIATYPE section.
1570 TestFileIter = TestFile.BusinessGeographyListMediatype.find(2);
1571 ASSERT_NE(TestFile.BusinessGeographyListMediatype.end(), TestFileIter);
1572 ASSERT_EQ("text/greenplain", TestFileIter->second);
1574 // Check the PREF section.
1576 TestFileIntIter = TestFile.BusinessGeographyListPref.find(2);
1577 ASSERT_NE(TestFile.BusinessGeographyListPref.end(), TestFileIntIter);
1578 ASSERT_EQ(4, TestFileIntIter->second);
1580 // Check the extra tokens.
1582 TestFileIter = TestFile.BusinessGeographyListTokens.find(2);
1583 ASSERT_NE(TestFile.BusinessGeographyListTokens.end(), TestFileIter);
1584 ASSERT_EQ("POS=Money", TestFileIter->second);
1588 TEST(ContactLoad, RelatedTests){
1590 ContactDataObject TestFile;
1592 // Check that the vCard 4.0 file loads OK.
1594 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1596 std::map<int,wxString>::iterator TestFileIter;
1597 std::map<int,int>::iterator TestFileIntIter;
1599 // Start with the first relation.
1601 TestFileIter = TestFile.GeneralRelatedList.find(0);
1602 ASSERT_NE(TestFile.GeneralRelatedList.end(), TestFileIter);
1603 ASSERT_EQ("Friend Test", TestFileIter->second);
1605 // Check the TYPE section.
1607 TestFileIter = TestFile.GeneralRelatedListType.find(0);
1608 ASSERT_NE(TestFile.GeneralRelatedListType.end(), TestFileIter);
1609 ASSERT_EQ("Kin", TestFileIter->second);
1611 // Check the ALTID section.
1613 TestFileIter = TestFile.GeneralRelatedListAltID.find(0);
1614 ASSERT_NE(TestFile.GeneralRelatedListAltID.end(), TestFileIter);
1615 ASSERT_EQ("5", TestFileIter->second);
1617 // Check the PID section.
1619 TestFileIter = TestFile.GeneralRelatedListPID.find(0);
1620 ASSERT_NE(TestFile.GeneralRelatedListPID.end(), TestFileIter);
1621 ASSERT_EQ("10", TestFileIter->second);
1623 // Check the PREF section.
1625 TestFileIntIter = TestFile.GeneralRelatedListPref.find(0);
1626 ASSERT_NE(TestFile.GeneralRelatedListPref.end(), TestFileIntIter);
1627 ASSERT_EQ(20, TestFileIntIter->second);
1629 // Check the extra tokens.
1631 TestFileIter = TestFile.GeneralRelatedListTokens.find(0);
1632 ASSERT_NE(TestFile.GeneralRelatedListTokens.end(), TestFileIter);
1633 ASSERT_EQ("OPTION=Yes", TestFileIter->second);
1635 // Start with the second relation.
1637 TestFileIter = TestFile.GeneralRelatedList.find(1);
1638 ASSERT_NE(TestFile.GeneralRelatedList.end(), TestFileIter);
1639 ASSERT_EQ("Friend Test Two", TestFileIter->second);
1641 // Check the TYPE section.
1643 TestFileIter = TestFile.GeneralRelatedListType.find(1);
1644 ASSERT_NE(TestFile.GeneralRelatedListType.end(), TestFileIter);
1645 ASSERT_EQ("Spouse", TestFileIter->second);
1647 // Check the ALTID section.
1649 TestFileIter = TestFile.GeneralRelatedListAltID.find(1);
1650 ASSERT_NE(TestFile.GeneralRelatedListAltID.end(), TestFileIter);
1651 ASSERT_EQ("1", TestFileIter->second);
1653 // Check the PID section.
1655 TestFileIter = TestFile.GeneralRelatedListPID.find(1);
1656 ASSERT_NE(TestFile.GeneralRelatedListPID.end(), TestFileIter);
1657 ASSERT_EQ("2", TestFileIter->second);
1659 // Check the PREF section.
1661 TestFileIntIter = TestFile.GeneralRelatedListPref.find(1);
1662 ASSERT_NE(TestFile.GeneralRelatedListPref.end(), TestFileIntIter);
1663 ASSERT_EQ(3, TestFileIntIter->second);
1665 // Check the extra tokens.
1667 TestFileIter = TestFile.GeneralRelatedListTokens.find(1);
1668 ASSERT_NE(TestFile.GeneralRelatedListTokens.end(), TestFileIter);
1669 ASSERT_EQ("OPTION=No", TestFileIter->second);
1671 // Start with the second relation.
1673 TestFileIter = TestFile.GeneralRelatedList.find(2);
1674 ASSERT_NE(TestFile.GeneralRelatedList.end(), TestFileIter);
1675 ASSERT_EQ("Friend Test Three", TestFileIter->second);
1677 // Check the TYPE section.
1679 TestFileIter = TestFile.GeneralRelatedListType.find(2);
1680 ASSERT_NE(TestFile.GeneralRelatedListType.end(), TestFileIter);
1681 ASSERT_EQ("Muse", TestFileIter->second);
1683 // Check the ALTID section.
1685 TestFileIter = TestFile.GeneralRelatedListAltID.find(2);
1686 ASSERT_NE(TestFile.GeneralRelatedListAltID.end(), TestFileIter);
1687 ASSERT_EQ("4", TestFileIter->second);
1689 // Check the PID section.
1691 TestFileIter = TestFile.GeneralRelatedListPID.find(2);
1692 ASSERT_NE(TestFile.GeneralRelatedListPID.end(), TestFileIter);
1693 ASSERT_EQ("5", TestFileIter->second);
1695 // Check the PREF section.
1697 TestFileIntIter = TestFile.GeneralRelatedListPref.find(2);
1698 ASSERT_NE(TestFile.GeneralRelatedListPref.end(), TestFileIntIter);
1699 ASSERT_EQ(6, TestFileIntIter->second);
1701 // Check the extra tokens.
1703 TestFileIter = TestFile.GeneralRelatedListTokens.find(2);
1704 ASSERT_NE(TestFile.GeneralRelatedListTokens.end(), TestFileIter);
1705 ASSERT_EQ("OPTION=Maybe", TestFileIter->second);
1709 TEST(ContactLoad, URLTests){
1711 ContactDataObject TestFile;
1713 // Check that the vCard 4.0 file loads OK.
1715 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1717 std::map<int,wxString>::iterator TestFileIter;
1718 std::map<int,int>::iterator TestFileIntIter;
1720 // Start with the general URL.
1722 TestFileIter = TestFile.GeneralWebsiteList.find(0);
1723 ASSERT_NE(TestFile.GeneralWebsiteList.end(), TestFileIter);
1724 ASSERT_EQ("http://example.com/", TestFileIter->second);
1726 // Check the ALTID section.
1728 TestFileIter = TestFile.GeneralWebsiteListAltID.find(0);
1729 ASSERT_NE(TestFile.GeneralWebsiteListAltID.end(), TestFileIter);
1730 ASSERT_EQ("0", TestFileIter->second);
1732 // Check the PID section.
1734 TestFileIter = TestFile.GeneralWebsiteListPID.find(0);
1735 ASSERT_NE(TestFile.GeneralWebsiteListPID.end(), TestFileIter);
1736 ASSERT_EQ("1", TestFileIter->second);
1738 // Check the MEDIATYPE section.
1740 TestFileIter = TestFile.GeneralWebsiteListMediatype.find(0);
1741 ASSERT_NE(TestFile.GeneralWebsiteListMediatype.end(), TestFileIter);
1742 ASSERT_EQ("text/plain", TestFileIter->second);
1744 // Check the PREF section.
1746 TestFileIntIter = TestFile.GeneralWebsiteListPref.find(0);
1747 ASSERT_NE(TestFile.GeneralWebsiteListPref.end(), TestFileIntIter);
1748 ASSERT_EQ(2, TestFileIntIter->second);
1750 // Check the extra tokens.
1752 TestFileIter = TestFile.GeneralWebsiteListTokens.find(0);
1753 ASSERT_NE(TestFile.GeneralWebsiteListTokens.end(), TestFileIter);
1754 ASSERT_EQ("MEEP=Moo", TestFileIter->second);
1756 // Start with the home URL.
1758 TestFileIter = TestFile.HomeWebsiteList.find(1);
1759 ASSERT_NE(TestFile.HomeWebsiteList.end(), TestFileIter);
1760 ASSERT_EQ("http://example.com/home/", TestFileIter->second);
1762 // Check the ALTID section.
1764 TestFileIter = TestFile.HomeWebsiteListAltID.find(1);
1765 ASSERT_NE(TestFile.HomeWebsiteListAltID.end(), TestFileIter);
1766 ASSERT_EQ("10", TestFileIter->second);
1768 // Check the PID section.
1770 TestFileIter = TestFile.HomeWebsiteListPID.find(1);
1771 ASSERT_NE(TestFile.HomeWebsiteListPID.end(), TestFileIter);
1772 ASSERT_EQ("11", TestFileIter->second);
1774 // Check the MEDIATYPE section.
1776 TestFileIter = TestFile.HomeWebsiteListMediatype.find(1);
1777 ASSERT_NE(TestFile.HomeWebsiteListMediatype.end(), TestFileIter);
1778 ASSERT_EQ("grass/soggy", TestFileIter->second);
1780 // Check the PREF section.
1782 TestFileIntIter = TestFile.HomeWebsiteListPref.find(1);
1783 ASSERT_NE(TestFile.HomeWebsiteListPref.end(), TestFileIntIter);
1784 ASSERT_EQ(12, TestFileIntIter->second);
1786 // Check the extra tokens.
1788 TestFileIter = TestFile.HomeWebsiteListTokens.find(1);
1789 ASSERT_NE(TestFile.HomeWebsiteListTokens.end(), TestFileIter);
1790 ASSERT_EQ("BON=Bon", TestFileIter->second);
1792 // Start with the business URL.
1794 TestFileIter = TestFile.BusinessWebsiteList.find(2);
1795 ASSERT_NE(TestFile.BusinessWebsiteList.end(), TestFileIter);
1796 ASSERT_EQ("http://example.com/business/", TestFileIter->second);
1798 // Check the ALTID section.
1800 TestFileIter = TestFile.BusinessWebsiteListAltID.find(2);
1801 ASSERT_NE(TestFile.BusinessWebsiteListAltID.end(), TestFileIter);
1802 ASSERT_EQ("20", TestFileIter->second);
1804 // Check the PID section.
1806 TestFileIter = TestFile.BusinessWebsiteListPID.find(2);
1807 ASSERT_NE(TestFile.BusinessWebsiteListPID.end(), TestFileIter);
1808 ASSERT_EQ("21", TestFileIter->second);
1810 // Check the MEDIATYPE section.
1812 TestFileIter = TestFile.BusinessWebsiteListMediatype.find(2);
1813 ASSERT_NE(TestFile.BusinessWebsiteListMediatype.end(), TestFileIter);
1814 ASSERT_EQ("chocolate/yummy", TestFileIter->second);
1816 // Check the PREF section.
1818 TestFileIntIter = TestFile.BusinessWebsiteListPref.find(2);
1819 ASSERT_NE(TestFile.BusinessWebsiteListPref.end(), TestFileIntIter);
1820 ASSERT_EQ(22, TestFileIntIter->second);
1822 // Check the extra tokens.
1824 TestFileIter = TestFile.BusinessWebsiteListTokens.find(2);
1825 ASSERT_NE(TestFile.BusinessWebsiteListTokens.end(), TestFileIter);
1826 ASSERT_EQ("YES=No", TestFileIter->second);
1830 TEST(ContactLoad, TitleTests){
1832 ContactDataObject TestFile;
1834 // Check that the vCard 4.0 file loads OK.
1836 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1838 std::map<int,wxString>::iterator TestFileIter;
1839 std::map<int,int>::iterator TestFileIntIter;
1841 // Start with the general title.
1843 TestFileIter = TestFile.GeneralTitleList.find(0);
1844 ASSERT_NE(TestFile.GeneralTitleList.end(), TestFileIter);
1845 ASSERT_EQ("Lord of Light", TestFileIter->second);
1847 // Check the ALTID section.
1849 TestFileIter = TestFile.GeneralTitleListAltID.find(0);
1850 ASSERT_NE(TestFile.GeneralTitleListAltID.end(), TestFileIter);
1851 ASSERT_EQ("20", TestFileIter->second);
1853 // Check the PID section.
1855 TestFileIter = TestFile.GeneralTitleListPID.find(0);
1856 ASSERT_NE(TestFile.GeneralTitleListPID.end(), TestFileIter);
1857 ASSERT_EQ("21", TestFileIter->second);
1859 // Check the LANGUAGE section.
1861 TestFileIter = TestFile.GeneralTitleListLanguage.find(0);
1862 ASSERT_NE(TestFile.GeneralTitleListLanguage.end(), TestFileIter);
1863 ASSERT_EQ("text/plain", TestFileIter->second);
1865 // Check the PREF section.
1867 TestFileIntIter = TestFile.GeneralTitleListPref.find(0);
1868 ASSERT_NE(TestFile.GeneralTitleListPref.end(), TestFileIntIter);
1869 ASSERT_EQ(22, TestFileIntIter->second);
1871 // Check the extra tokens.
1873 TestFileIter = TestFile.GeneralTitleListTokens.find(0);
1874 ASSERT_NE(TestFile.GeneralTitleListTokens.end(), TestFileIter);
1875 ASSERT_EQ("EEP=LIGHT", TestFileIter->second);
1877 // Start with the home title.
1879 TestFileIter = TestFile.HomeTitleList.find(1);
1880 ASSERT_NE(TestFile.HomeTitleList.end(), TestFileIter);
1881 ASSERT_EQ("Lord of Darkness", TestFileIter->second);
1883 // Check the ALTID section.
1885 TestFileIter = TestFile.HomeTitleListAltID.find(1);
1886 ASSERT_NE(TestFile.HomeTitleListAltID.end(), TestFileIter);
1887 ASSERT_EQ("30", TestFileIter->second);
1889 // Check the PID section.
1891 TestFileIter = TestFile.HomeTitleListPID.find(1);
1892 ASSERT_NE(TestFile.HomeTitleListPID.end(), TestFileIter);
1893 ASSERT_EQ("31", TestFileIter->second);
1895 // Check the LANGUAGE section.
1897 TestFileIter = TestFile.HomeTitleListLanguage.find(1);
1898 ASSERT_NE(TestFile.HomeTitleListLanguage.end(), TestFileIter);
1899 ASSERT_EQ("grass/dry", TestFileIter->second);
1901 // Check the PREF section.
1903 TestFileIntIter = TestFile.HomeTitleListPref.find(1);
1904 ASSERT_NE(TestFile.HomeTitleListPref.end(), TestFileIntIter);
1905 ASSERT_EQ(32, TestFileIntIter->second);
1907 // Check the extra tokens.
1909 TestFileIter = TestFile.HomeTitleListTokens.find(1);
1910 ASSERT_NE(TestFile.HomeTitleListTokens.end(), TestFileIter);
1911 ASSERT_EQ("EEP=DARK", TestFileIter->second);
1913 // Start with the business title.
1915 TestFileIter = TestFile.BusinessTitleList.find(2);
1916 ASSERT_NE(TestFile.BusinessTitleList.end(), TestFileIter);
1917 ASSERT_EQ("Master of the Light & Darkness", TestFileIter->second);
1919 // Check the ALTID section.
1921 TestFileIter = TestFile.BusinessTitleListAltID.find(2);
1922 ASSERT_NE(TestFile.BusinessTitleListAltID.end(), TestFileIter);
1923 ASSERT_EQ("40", TestFileIter->second);
1925 // Check the PID section.
1927 TestFileIter = TestFile.BusinessTitleListPID.find(2);
1928 ASSERT_NE(TestFile.BusinessTitleListPID.end(), TestFileIter);
1929 ASSERT_EQ("41", TestFileIter->second);
1931 // Check the LANGUAGE section.
1933 TestFileIter = TestFile.BusinessTitleListLanguage.find(2);
1934 ASSERT_NE(TestFile.BusinessTitleListLanguage.end(), TestFileIter);
1935 ASSERT_EQ("moths/eew", TestFileIter->second);
1937 // Check the PREF section.
1939 TestFileIntIter = TestFile.BusinessTitleListPref.find(2);
1940 ASSERT_NE(TestFile.BusinessTitleListPref.end(), TestFileIntIter);
1941 ASSERT_EQ(42, TestFileIntIter->second);
1943 // Check the extra tokens.
1945 TestFileIter = TestFile.BusinessTitleListTokens.find(2);
1946 ASSERT_NE(TestFile.BusinessTitleListTokens.end(), TestFileIter);
1947 ASSERT_EQ("EEP=BOTH", TestFileIter->second);
1951 TEST(ContactLoad, RoleTests){
1953 ContactDataObject TestFile;
1955 // Check that the vCard 4.0 file loads OK.
1957 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
1959 std::map<int,wxString>::iterator TestFileIter;
1960 std::map<int,int>::iterator TestFileIntIter;
1962 // Start with the general role.
1964 TestFileIter = TestFile.GeneralRoleList.find(0);
1965 ASSERT_NE(TestFile.GeneralRoleList.end(), TestFileIter);
1966 ASSERT_EQ("Ordinary Person", TestFileIter->second);
1968 // Check the ALTID section.
1970 TestFileIter = TestFile.GeneralRoleListAltID.find(0);
1971 ASSERT_NE(TestFile.GeneralRoleListAltID.end(), TestFileIter);
1972 ASSERT_EQ("50", TestFileIter->second);
1974 // Check the PID section.
1976 TestFileIter = TestFile.GeneralRoleListPID.find(0);
1977 ASSERT_NE(TestFile.GeneralRoleListPID.end(), TestFileIter);
1978 ASSERT_EQ("51", TestFileIter->second);
1980 // Check the LANGUAGE section.
1982 TestFileIter = TestFile.GeneralRoleListLanguage.find(0);
1983 ASSERT_NE(TestFile.GeneralRoleListLanguage.end(), TestFileIter);
1984 ASSERT_EQ("en", TestFileIter->second);
1986 // Check the PREF section.
1988 TestFileIntIter = TestFile.GeneralRoleListPref.find(0);
1989 ASSERT_NE(TestFile.GeneralRoleListPref.end(), TestFileIntIter);
1990 ASSERT_EQ(52, TestFileIntIter->second);
1992 // Check the extra tokens.
1994 TestFileIter = TestFile.GeneralRoleListTokens.find(0);
1995 ASSERT_NE(TestFile.GeneralRoleListTokens.end(), TestFileIter);
1996 ASSERT_EQ("ASTERISK=None", TestFileIter->second);
1998 // Start with the home role.
2000 TestFileIter = TestFile.HomeRoleList.find(1);
2001 ASSERT_NE(TestFile.HomeRoleList.end(), TestFileIter);
2002 ASSERT_EQ("Ordinary Lazy Person", TestFileIter->second);
2004 // Check the ALTID section.
2006 TestFileIter = TestFile.HomeRoleListAltID.find(1);
2007 ASSERT_NE(TestFile.HomeRoleListAltID.end(), TestFileIter);
2008 ASSERT_EQ("60", TestFileIter->second);
2010 // Check the PID section.
2012 TestFileIter = TestFile.HomeRoleListPID.find(1);
2013 ASSERT_NE(TestFile.HomeRoleListPID.end(), TestFileIter);
2014 ASSERT_EQ("61", TestFileIter->second);
2016 // Check the LANGUAGE section.
2018 TestFileIter = TestFile.HomeRoleListLanguage.find(1);
2019 ASSERT_NE(TestFile.HomeRoleListLanguage.end(), TestFileIter);
2020 ASSERT_EQ("en-GB", TestFileIter->second);
2022 // Check the PREF section.
2024 TestFileIntIter = TestFile.HomeRoleListPref.find(1);
2025 ASSERT_NE(TestFile.HomeRoleListPref.end(), TestFileIntIter);
2026 ASSERT_EQ(62, TestFileIntIter->second);
2028 // Check the extra tokens.
2030 TestFileIter = TestFile.HomeRoleListTokens.find(1);
2031 ASSERT_NE(TestFile.HomeRoleListTokens.end(), TestFileIter);
2032 ASSERT_EQ("SOMEWHERE=There", TestFileIter->second);
2034 // Start with the business role.
2036 TestFileIter = TestFile.BusinessRoleList.find(2);
2037 ASSERT_NE(TestFile.BusinessRoleList.end(), TestFileIter);
2038 ASSERT_EQ("Company Owner", TestFileIter->second);
2040 // Check the ALTID section.
2042 TestFileIter = TestFile.BusinessRoleListAltID.find(2);
2043 ASSERT_NE(TestFile.BusinessRoleListAltID.end(), TestFileIter);
2044 ASSERT_EQ("70", TestFileIter->second);
2046 // Check the PID section.
2048 TestFileIter = TestFile.BusinessRoleListPID.find(2);
2049 ASSERT_NE(TestFile.BusinessRoleListPID.end(), TestFileIter);
2050 ASSERT_EQ("71", TestFileIter->second);
2052 // Check the LANGUAGE section.
2054 TestFileIter = TestFile.BusinessRoleListLanguage.find(2);
2055 ASSERT_NE(TestFile.BusinessRoleListLanguage.end(), TestFileIter);
2056 ASSERT_EQ("en-AU", TestFileIter->second);
2058 // Check the PREF section.
2060 TestFileIntIter = TestFile.BusinessRoleListPref.find(2);
2061 ASSERT_NE(TestFile.BusinessRoleListPref.end(), TestFileIntIter);
2062 ASSERT_EQ(72, TestFileIntIter->second);
2064 // Check the extra tokens.
2066 TestFileIter = TestFile.BusinessRoleListTokens.find(2);
2067 ASSERT_NE(TestFile.BusinessRoleListTokens.end(), TestFileIter);
2068 ASSERT_EQ("HERE=Nope", TestFileIter->second);
2072 TEST(ContactLoad, OrganisationTests){
2074 ContactDataObject TestFile;
2076 // Check that the vCard 4.0 file loads OK.
2078 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2080 std::map<int,wxString>::iterator TestFileIter;
2081 std::map<int,int>::iterator TestFileIntIter;
2083 // Start with the general organisation.
2085 TestFileIter = TestFile.GeneralOrganisationsList.find(0);
2086 ASSERT_NE(TestFile.GeneralOrganisationsList.end(), TestFileIter);
2087 ASSERT_EQ("Ordinary Organisation", TestFileIter->second);
2089 // Check the SORT-AS section.
2091 TestFileIter = TestFile.GeneralOrganisationsListSortAs.find(0);
2092 ASSERT_NE(TestFile.GeneralOrganisationsListSortAs.end(), TestFileIter);
2093 ASSERT_EQ("Organisation, Ordinary", TestFileIter->second);
2095 // Check the ALTID section.
2097 TestFileIter = TestFile.GeneralOrganisationsListAltID.find(0);
2098 ASSERT_NE(TestFile.GeneralOrganisationsListAltID.end(), TestFileIter);
2099 ASSERT_EQ("50", TestFileIter->second);
2101 // Check the PID section.
2103 TestFileIter = TestFile.GeneralOrganisationsListPID.find(0);
2104 ASSERT_NE(TestFile.GeneralOrganisationsListPID.end(), TestFileIter);
2105 ASSERT_EQ("51", TestFileIter->second);
2107 // Check the LANGUAGE section.
2109 TestFileIter = TestFile.GeneralOrganisationsListLanguage.find(0);
2110 ASSERT_NE(TestFile.GeneralOrganisationsListLanguage.end(), TestFileIter);
2111 ASSERT_EQ("en", TestFileIter->second);
2113 // Check the PREF section.
2115 TestFileIntIter = TestFile.GeneralOrganisationsListPref.find(0);
2116 ASSERT_NE(TestFile.GeneralOrganisationsListPref.end(), TestFileIntIter);
2117 ASSERT_EQ(52, TestFileIntIter->second);
2119 // Check the extra tokens.
2121 TestFileIter = TestFile.GeneralOrganisationsListTokens.find(0);
2122 ASSERT_NE(TestFile.GeneralOrganisationsListTokens.end(), TestFileIter);
2123 ASSERT_EQ("ASTERISK=None", TestFileIter->second);
2125 // Start with the home Organisation.
2127 TestFileIter = TestFile.HomeOrganisationsList.find(1);
2128 ASSERT_NE(TestFile.HomeOrganisationsList.end(), TestFileIter);
2129 ASSERT_EQ("Ordinary Lazy Person", TestFileIter->second);
2131 // Check the SORT-AS section.
2133 TestFileIter = TestFile.HomeOrganisationsListSortAs.find(1);
2134 ASSERT_NE(TestFile.HomeOrganisationsListSortAs.end(), TestFileIter);
2135 ASSERT_EQ("Person, Ordinary Lazy", TestFileIter->second);
2137 // Check the ALTID section.
2139 TestFileIter = TestFile.HomeOrganisationsListAltID.find(1);
2140 ASSERT_NE(TestFile.HomeOrganisationsListAltID.end(), TestFileIter);
2141 ASSERT_EQ("60", TestFileIter->second);
2143 // Check the PID section.
2145 TestFileIter = TestFile.HomeOrganisationsListPID.find(1);
2146 ASSERT_NE(TestFile.HomeOrganisationsListPID.end(), TestFileIter);
2147 ASSERT_EQ("61", TestFileIter->second);
2149 // Check the LANGUAGE section.
2151 TestFileIter = TestFile.HomeOrganisationsListLanguage.find(1);
2152 ASSERT_NE(TestFile.HomeOrganisationsListLanguage.end(), TestFileIter);
2153 ASSERT_EQ("en-GB", TestFileIter->second);
2155 // Check the PREF section.
2157 TestFileIntIter = TestFile.HomeOrganisationsListPref.find(1);
2158 ASSERT_NE(TestFile.HomeOrganisationsListPref.end(), TestFileIntIter);
2159 ASSERT_EQ(62, TestFileIntIter->second);
2161 // Check the extra tokens.
2163 TestFileIter = TestFile.HomeOrganisationsListTokens.find(1);
2164 ASSERT_NE(TestFile.HomeOrganisationsListTokens.end(), TestFileIter);
2165 ASSERT_EQ("SOMEWHERE=There", TestFileIter->second);
2167 // Start with the business Organisation.
2169 TestFileIter = TestFile.BusinessOrganisationsList.find(2);
2170 ASSERT_NE(TestFile.BusinessOrganisationsList.end(), TestFileIter);
2171 ASSERT_EQ("Company Owner", TestFileIter->second);
2173 // Check the SORT-AS section.
2175 TestFileIter = TestFile.BusinessOrganisationsListSortAs.find(2);
2176 ASSERT_NE(TestFile.BusinessOrganisationsListSortAs.end(), TestFileIter);
2177 ASSERT_EQ("Owner, Company", TestFileIter->second);
2179 // Check the ALTID section.
2181 TestFileIter = TestFile.BusinessOrganisationsListAltID.find(2);
2182 ASSERT_NE(TestFile.BusinessOrganisationsListAltID.end(), TestFileIter);
2183 ASSERT_EQ("70", TestFileIter->second);
2185 // Check the PID section.
2187 TestFileIter = TestFile.BusinessOrganisationsListPID.find(2);
2188 ASSERT_NE(TestFile.BusinessOrganisationsListPID.end(), TestFileIter);
2189 ASSERT_EQ("71", TestFileIter->second);
2191 // Check the LANGUAGE section.
2193 TestFileIter = TestFile.BusinessOrganisationsListLanguage.find(2);
2194 ASSERT_NE(TestFile.BusinessOrganisationsListLanguage.end(), TestFileIter);
2195 ASSERT_EQ("en-AU", TestFileIter->second);
2197 // Check the PREF section.
2199 TestFileIntIter = TestFile.BusinessOrganisationsListPref.find(2);
2200 ASSERT_NE(TestFile.BusinessOrganisationsListPref.end(), TestFileIntIter);
2201 ASSERT_EQ(72, TestFileIntIter->second);
2203 // Check the extra tokens.
2205 TestFileIter = TestFile.BusinessOrganisationsListTokens.find(2);
2206 ASSERT_NE(TestFile.BusinessOrganisationsListTokens.end(), TestFileIter);
2207 ASSERT_EQ("HERE=Nope", TestFileIter->second);
2211 TEST(ContactLoad, NoteTests){
2213 ContactDataObject TestFile;
2215 // Check that the vCard 4.0 file loads OK.
2217 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2219 std::map<int,wxString>::iterator TestFileIter;
2220 std::map<int,int>::iterator TestFileIntIter;
2222 // Start with the general note.
2224 TestFileIter = TestFile.GeneralNoteList.find(0);
2225 ASSERT_NE(TestFile.GeneralNoteList.end(), TestFileIter);
2226 ASSERT_EQ("Note\n\nLine 3\nLine 4\nLine 5", TestFileIter->second);
2228 // Check the ALTID section.
2230 TestFileIter = TestFile.GeneralNoteListAltID.find(0);
2231 ASSERT_NE(TestFile.GeneralNoteListAltID.end(), TestFileIter);
2232 ASSERT_EQ("90", TestFileIter->second);
2234 // Check the PID section.
2236 TestFileIter = TestFile.GeneralNoteListPID.find(0);
2237 ASSERT_NE(TestFile.GeneralNoteListPID.end(), TestFileIter);
2238 ASSERT_EQ("91", TestFileIter->second);
2240 // Check the LANGUAGE section.
2242 TestFileIter = TestFile.GeneralNoteListLanguage.find(0);
2243 ASSERT_NE(TestFile.GeneralNoteListLanguage.end(), TestFileIter);
2244 ASSERT_EQ("en", TestFileIter->second);
2246 // Check the PREF section.
2248 TestFileIntIter = TestFile.GeneralNoteListPref.find(0);
2249 ASSERT_NE(TestFile.GeneralNoteListPref.end(), TestFileIntIter);
2250 ASSERT_EQ(92, TestFileIntIter->second);
2252 // Check the extra tokens.
2254 TestFileIter = TestFile.GeneralNoteListTokens.find(0);
2255 ASSERT_NE(TestFile.GeneralNoteListTokens.end(), TestFileIter);
2256 ASSERT_EQ("WOO=WOOP", TestFileIter->second);
2258 // Start with the home note.
2260 TestFileIter = TestFile.HomeNoteList.find(1);
2261 ASSERT_NE(TestFile.HomeNoteList.end(), TestFileIter);
2262 ASSERT_EQ("Note\n\n\n\nLine 5\nLine 6\nLine 7", TestFileIter->second);
2264 // Check the ALTID section.
2266 TestFileIter = TestFile.HomeNoteListAltID.find(1);
2267 ASSERT_NE(TestFile.HomeNoteListAltID.end(), TestFileIter);
2268 ASSERT_EQ("80", TestFileIter->second);
2270 // Check the PID section.
2272 TestFileIter = TestFile.HomeNoteListPID.find(1);
2273 ASSERT_NE(TestFile.HomeNoteListPID.end(), TestFileIter);
2274 ASSERT_EQ("81", TestFileIter->second);
2276 // Check the LANGUAGE section.
2278 TestFileIter = TestFile.HomeNoteListLanguage.find(1);
2279 ASSERT_NE(TestFile.HomeNoteListLanguage.end(), TestFileIter);
2280 ASSERT_EQ("kw", TestFileIter->second);
2282 // Check the PREF section.
2284 TestFileIntIter = TestFile.HomeNoteListPref.find(1);
2285 ASSERT_NE(TestFile.HomeNoteListPref.end(), TestFileIntIter);
2286 ASSERT_EQ(82, TestFileIntIter->second);
2288 // Check the extra tokens.
2290 TestFileIter = TestFile.HomeNoteListTokens.find(1);
2291 ASSERT_NE(TestFile.HomeNoteListTokens.end(), TestFileIter);
2292 ASSERT_EQ("MOO=MEEP", TestFileIter->second);
2294 // Start with the business note.
2296 TestFileIter = TestFile.BusinessNoteList.find(2);
2297 ASSERT_NE(TestFile.BusinessNoteList.end(), TestFileIter);
2298 ASSERT_EQ("Note\n\n\n\nLine 8\nLine 9\nLine 10", TestFileIter->second);
2300 // Check the ALTID section.
2302 TestFileIter = TestFile.BusinessNoteListAltID.find(2);
2303 ASSERT_NE(TestFile.BusinessNoteListAltID.end(), TestFileIter);
2304 ASSERT_EQ("70", TestFileIter->second);
2306 // Check the PID section.
2308 TestFileIter = TestFile.BusinessNoteListPID.find(2);
2309 ASSERT_NE(TestFile.BusinessNoteListPID.end(), TestFileIter);
2310 ASSERT_EQ("71", TestFileIter->second);
2312 // Check the LANGUAGE section.
2314 TestFileIter = TestFile.BusinessNoteListLanguage.find(2);
2315 ASSERT_NE(TestFile.BusinessNoteListLanguage.end(), TestFileIter);
2316 ASSERT_EQ("fr", TestFileIter->second);
2318 // Check the PREF section.
2320 TestFileIntIter = TestFile.BusinessNoteListPref.find(2);
2321 ASSERT_NE(TestFile.BusinessNoteListPref.end(), TestFileIntIter);
2322 ASSERT_EQ(72, TestFileIntIter->second);
2324 // Check the extra tokens.
2326 TestFileIter = TestFile.BusinessNoteListTokens.find(2);
2327 ASSERT_NE(TestFile.BusinessNoteListTokens.end(), TestFileIter);
2328 ASSERT_EQ("BOING=BOOP", TestFileIter->second);
2332 TEST(ContactLoad, CategoryTests){
2334 ContactDataObject TestFile;
2336 // Check that the vCard 4.0 file loads OK.
2338 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2340 std::map<int,wxString>::iterator TestFileIter;
2341 std::map<int,int>::iterator TestFileIntIter;
2343 // Start with the first category.
2345 TestFileIter = TestFile.CategoriesList.find(0);
2346 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2347 ASSERT_EQ("Category One", TestFileIter->second);
2349 // Check the TYPE section.
2351 TestFileIter = TestFile.CategoriesListType.find(0);
2352 ASSERT_EQ(TestFile.CategoriesListType.end(), TestFileIter);
2354 // Check the ALTID section.
2356 TestFileIter = TestFile.CategoriesListAltID.find(0);
2357 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2358 ASSERT_EQ("40", TestFileIter->second);
2360 // Check the PID section.
2362 TestFileIter = TestFile.CategoriesListPID.find(0);
2363 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2364 ASSERT_EQ("41", TestFileIter->second);
2366 // Check the LANGUAGE section.
2368 TestFileIter = TestFile.CategoriesListLanguage.find(0);
2369 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2370 ASSERT_EQ("en", TestFileIter->second);
2372 // Check the PREF section.
2374 TestFileIntIter = TestFile.CategoriesListPref.find(0);
2375 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2376 ASSERT_EQ(42, TestFileIntIter->second);
2378 // Check the extra tokens.
2380 TestFileIter = TestFile.CategoriesListTokens.find(0);
2381 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2382 ASSERT_EQ("CAT=TAC", TestFileIter->second);
2384 // Start with the second & third category.
2385 // (Category Two, Category Three).
2387 TestFileIter = TestFile.CategoriesList.find(1);
2388 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2389 ASSERT_EQ("Category Two", TestFileIter->second);
2391 TestFileIter = TestFile.CategoriesList.find(2);
2392 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2393 ASSERT_EQ("Category Three", TestFileIter->second);
2395 // Check the TYPE section.
2397 TestFileIter = TestFile.CategoriesListType.find(1);
2398 ASSERT_NE(TestFile.CategoriesListType.end(), TestFileIter);
2399 ASSERT_EQ("home", TestFileIter->second);
2401 TestFileIter = TestFile.CategoriesListType.find(2);
2402 ASSERT_NE(TestFile.CategoriesListType.end(), TestFileIter);
2403 ASSERT_EQ("home", TestFileIter->second);
2405 // Check the ALTID section.
2407 TestFileIter = TestFile.CategoriesListAltID.find(1);
2408 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2409 ASSERT_EQ("44", TestFileIter->second);
2411 TestFileIter = TestFile.CategoriesListAltID.find(2);
2412 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2413 ASSERT_EQ("44", TestFileIter->second);
2415 // Check the PID section.
2417 TestFileIter = TestFile.CategoriesListPID.find(1);
2418 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2419 ASSERT_EQ("46", TestFileIter->second);
2421 TestFileIter = TestFile.CategoriesListPID.find(2);
2422 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2423 ASSERT_EQ("46", TestFileIter->second);
2425 // Check the LANGUAGE section.
2427 TestFileIter = TestFile.CategoriesListLanguage.find(1);
2428 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2429 ASSERT_EQ("kw", TestFileIter->second);
2431 TestFileIter = TestFile.CategoriesListLanguage.find(2);
2432 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2433 ASSERT_EQ("kw", TestFileIter->second);
2435 // Check the PREF section.
2437 TestFileIntIter = TestFile.CategoriesListPref.find(1);
2438 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2439 ASSERT_EQ(48, TestFileIntIter->second);
2441 TestFileIntIter = TestFile.CategoriesListPref.find(2);
2442 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2443 ASSERT_EQ(48, TestFileIntIter->second);
2445 // Check the extra tokens.
2447 TestFileIter = TestFile.CategoriesListTokens.find(1);
2448 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2449 ASSERT_EQ("TAC=CAT", TestFileIter->second);
2451 TestFileIter = TestFile.CategoriesListTokens.find(2);
2452 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2453 ASSERT_EQ("TAC=CAT", TestFileIter->second);
2455 // Start with the third, fourth & fifth category.
2456 // (Category Three,Category Four,Category Five).
2458 TestFileIter = TestFile.CategoriesList.find(3);
2459 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2460 ASSERT_EQ("Category Four", TestFileIter->second.ToStdString());
2462 TestFileIter = TestFile.CategoriesList.find(4);
2463 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2464 ASSERT_EQ("Category Five", TestFileIter->second.ToStdString());
2466 TestFileIter = TestFile.CategoriesList.find(5);
2467 ASSERT_NE(TestFile.CategoriesList.end(), TestFileIter);
2468 ASSERT_EQ("Category Six", TestFileIter->second);
2470 // Check the TYPE section.
2472 TestFileIter = TestFile.CategoriesListType.find(3);
2473 ASSERT_NE(TestFile.CategoriesListType.end(), TestFileIter);
2474 ASSERT_EQ("work", TestFileIter->second);
2476 TestFileIter = TestFile.CategoriesListType.find(4);
2477 ASSERT_NE(TestFile.CategoriesListType.end(), TestFileIter);
2478 ASSERT_EQ("work", TestFileIter->second);
2480 TestFileIter = TestFile.CategoriesListType.find(5);
2481 ASSERT_NE(TestFile.CategoriesListType.end(), TestFileIter);
2482 ASSERT_EQ("work", TestFileIter->second);
2484 // Check the ALTID section.
2486 TestFileIter = TestFile.CategoriesListAltID.find(3);
2487 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2488 ASSERT_EQ("84", TestFileIter->second);
2490 TestFileIter = TestFile.CategoriesListAltID.find(4);
2491 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2492 ASSERT_EQ("84", TestFileIter->second);
2494 TestFileIter = TestFile.CategoriesListAltID.find(5);
2495 ASSERT_NE(TestFile.CategoriesListAltID.end(), TestFileIter);
2496 ASSERT_EQ("84", TestFileIter->second);
2498 // Check the PID section.
2500 TestFileIter = TestFile.CategoriesListPID.find(3);
2501 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2502 ASSERT_EQ("86", TestFileIter->second);
2504 TestFileIter = TestFile.CategoriesListPID.find(4);
2505 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2506 ASSERT_EQ("86", TestFileIter->second);
2508 TestFileIter = TestFile.CategoriesListPID.find(5);
2509 ASSERT_NE(TestFile.CategoriesListPID.end(), TestFileIter);
2510 ASSERT_EQ("86", TestFileIter->second);
2512 // Check the LANGUAGE section.
2514 TestFileIter = TestFile.CategoriesListLanguage.find(3);
2515 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2516 ASSERT_EQ("kw", TestFileIter->second);
2518 TestFileIter = TestFile.CategoriesListLanguage.find(4);
2519 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2520 ASSERT_EQ("kw", TestFileIter->second);
2522 TestFileIter = TestFile.CategoriesListLanguage.find(5);
2523 ASSERT_NE(TestFile.CategoriesListLanguage.end(), TestFileIter);
2524 ASSERT_EQ("kw", TestFileIter->second);
2526 // Check the PREF section.
2528 TestFileIntIter = TestFile.CategoriesListPref.find(3);
2529 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2530 ASSERT_EQ(88, TestFileIntIter->second);
2532 TestFileIntIter = TestFile.CategoriesListPref.find(4);
2533 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2534 ASSERT_EQ(88, TestFileIntIter->second);
2536 TestFileIntIter = TestFile.CategoriesListPref.find(5);
2537 ASSERT_NE(TestFile.CategoriesListPref.end(), TestFileIntIter);
2538 ASSERT_EQ(88, TestFileIntIter->second);
2540 // Check the extra tokens.
2542 TestFileIter = TestFile.CategoriesListTokens.find(3);
2543 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2544 ASSERT_EQ("AAA=BBB", TestFileIter->second);
2546 TestFileIter = TestFile.CategoriesListTokens.find(4);
2547 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2548 ASSERT_EQ("AAA=BBB", TestFileIter->second);
2550 TestFileIter = TestFile.CategoriesListTokens.find(4);
2551 ASSERT_NE(TestFile.CategoriesListTokens.end(), TestFileIter);
2552 ASSERT_EQ("AAA=BBB", TestFileIter->second);
2556 TEST(ContactLoad, PhotoTests){
2558 ContactDataObject TestFile;
2560 // Check that the vCard 4.0 file loads OK.
2562 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2564 std::map<int,std::string>::iterator TestStrIter;
2565 std::map<int,wxString>::iterator TestFileIter;
2566 std::map<int,int>::iterator TestFileIntIter;
2568 // Start with the first photo.
2570 TestStrIter = TestFile.PicturesList.find(0);
2571 ASSERT_NE(TestFile.PicturesList.end(), TestStrIter);
2572 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAJUlEQVQoz2NkwAb+//8PYTAyMmLKMjGQDuilhxHudBrbM8zCDQCxHQkPeaUvawAAAABJRU5ErkJggg==",
2573 TestStrIter->second);
2575 // Check that it has the correct encoding.
2577 TestFileIter = TestFile.PicturesListPicEncType.find(0);
2578 ASSERT_NE(TestFile.PicturesListPicEncType.end(), TestFileIter);
2579 ASSERT_EQ("base64", TestFileIter->second);
2581 // Check that it has the correct image type.
2583 TestFileIter = TestFile.PicturesListPictureType.find(0);
2584 ASSERT_NE(TestFile.PicturesListPictureType.end(), TestFileIter);
2585 ASSERT_EQ("image/png", TestFileIter->second);
2587 // Check the ALTID section.
2589 TestFileIter = TestFile.PicturesListAltID.find(0);
2590 ASSERT_NE(TestFile.PicturesListAltID.end(), TestFileIter);
2591 ASSERT_EQ("70", TestFileIter->second);
2593 // Check the PID section.
2595 TestFileIter = TestFile.PicturesListPID.find(0);
2596 ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
2597 ASSERT_EQ("71", TestFileIter->second);
2599 // Check the TYPE section.
2601 TestFileIter = TestFile.PicturesListType.find(0);
2602 ASSERT_EQ(TestFile.PicturesListType.end(), TestFileIter);
2604 // Check the MEDIATYPE section.
2606 TestFileIter = TestFile.PicturesListMediatype.find(0);
2607 ASSERT_NE(TestFile.PicturesListMediatype.end(), TestFileIter);
2608 ASSERT_EQ("image/png", TestFileIter->second);
2610 // Check the PREF section.
2612 TestFileIntIter = TestFile.PicturesListPref.find(0);
2613 ASSERT_NE(TestFile.PicturesListPref.end(), TestFileIntIter);
2614 ASSERT_EQ(72, TestFileIntIter->second);
2616 // Check the extra tokens.
2618 TestFileIter = TestFile.PicturesListTokens.find(0);
2619 ASSERT_NE(TestFile.PicturesListTokens.end(), TestFileIter);
2620 ASSERT_EQ("MEEP=MOO", TestFileIter->second);
2622 // Start with the second photo.
2624 TestStrIter = TestFile.PicturesList.find(1);
2625 ASSERT_NE(TestFile.PicturesList.end(), TestStrIter);
2626 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2NkYPjPgAr+owkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC",
2627 TestStrIter->second);
2629 // Check that it has the correct encoding.
2631 TestFileIter = TestFile.PicturesListPicEncType.find(1);
2632 ASSERT_NE(TestFile.PicturesListPicEncType.end(), TestFileIter);
2633 ASSERT_EQ("base64", TestFileIter->second);
2635 // Check that it has the correct image type.
2637 TestFileIter = TestFile.PicturesListPictureType.find(1);
2638 ASSERT_NE(TestFile.PicturesListPictureType.end(), TestFileIter);
2639 ASSERT_EQ("image/png", TestFileIter->second);
2641 // Check the ALTID section.
2643 TestFileIter = TestFile.PicturesListAltID.find(1);
2644 ASSERT_NE(TestFile.PicturesListAltID.end(), TestFileIter);
2645 ASSERT_EQ("20", TestFileIter->second);
2647 // Check the PID section.
2649 TestFileIter = TestFile.PicturesListPID.find(1);
2650 ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
2651 ASSERT_EQ("21", TestFileIter->second);
2653 // Check the TYPE section.
2655 TestFileIter = TestFile.PicturesListType.find(1);
2656 ASSERT_NE(TestFile.PicturesListType.end(), TestFileIter);
2657 ASSERT_EQ("home", TestFileIter->second);
2659 // Check the MEDIATYPE section.
2661 TestFileIter = TestFile.PicturesListMediatype.find(1);
2662 ASSERT_NE(TestFile.PicturesListMediatype.end(), TestFileIter);
2663 ASSERT_EQ("image/png", TestFileIter->second);
2665 // Check the PREF section.
2667 TestFileIntIter = TestFile.PicturesListPref.find(1);
2668 ASSERT_NE(TestFile.PicturesListPref.end(), TestFileIntIter);
2669 ASSERT_EQ(22, TestFileIntIter->second);
2671 // Check the extra tokens.
2673 TestFileIter = TestFile.PicturesListTokens.find(1);
2674 ASSERT_NE(TestFile.PicturesListTokens.end(), TestFileIter);
2675 ASSERT_EQ("BEEP=BOOP", TestFileIter->second);
2677 // Start with the second photo.
2679 TestStrIter = TestFile.PicturesList.find(2);
2680 ASSERT_NE(TestFile.PicturesList.end(), TestStrIter);
2681 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm53EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=",
2682 TestStrIter->second);
2684 // Check that it has the correct encoding.
2686 TestFileIter = TestFile.PicturesListPicEncType.find(2);
2687 ASSERT_NE(TestFile.PicturesListPicEncType.end(), TestFileIter);
2688 ASSERT_EQ("base64", TestFileIter->second);
2690 // Check that it has the correct image type.
2692 TestFileIter = TestFile.PicturesListPictureType.find(2);
2693 ASSERT_NE(TestFile.PicturesListPictureType.end(), TestFileIter);
2694 ASSERT_EQ("image/png", TestFileIter->second);
2696 // Check the ALTID section.
2698 TestFileIter = TestFile.PicturesListAltID.find(2);
2699 ASSERT_NE(TestFile.PicturesListAltID.end(), TestFileIter);
2700 ASSERT_EQ("90", TestFileIter->second);
2702 // Check the PID section.
2704 TestFileIter = TestFile.PicturesListPID.find(2);
2705 ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
2706 ASSERT_EQ("91", TestFileIter->second);
2708 // Check the TYPE section.
2710 TestFileIter = TestFile.PicturesListType.find(2);
2711 ASSERT_NE(TestFile.PicturesListType.end(), TestFileIter);
2712 ASSERT_EQ("work", TestFileIter->second);
2714 // Check the MEDIATYPE section.
2716 TestFileIter = TestFile.PicturesListMediatype.find(2);
2717 ASSERT_NE(TestFile.PicturesListMediatype.end(), TestFileIter);
2718 ASSERT_EQ("image/png", TestFileIter->second);
2720 // Check the PREF section.
2722 TestFileIntIter = TestFile.PicturesListPref.find(2);
2723 ASSERT_NE(TestFile.PicturesListPref.end(), TestFileIntIter);
2724 ASSERT_EQ(92, TestFileIntIter->second);
2726 // Check the extra tokens.
2728 TestFileIter = TestFile.PicturesListTokens.find(2);
2729 ASSERT_NE(TestFile.PicturesListTokens.end(), TestFileIter);
2730 ASSERT_EQ("PHOTO=YUP", TestFileIter->second);
2734 TEST(ContactLoad, LogoTests){
2736 ContactDataObject TestFile;
2738 // Check that the vCard 4.0 file loads OK.
2740 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2742 std::map<int,std::string>::iterator TestStrIter;
2743 std::map<int,wxString>::iterator TestFileIter;
2744 std::map<int,int>::iterator TestFileIntIter;
2746 // Start with the first photo.
2748 TestStrIter = TestFile.LogosList.find(0);
2749 ASSERT_NE(TestFile.LogosList.end(), TestStrIter);
2750 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAJUlEQVQoz2NkwAb+//8PYTAyMmLKMjGQDuilhxHudBrbM8zCDQCxHQkPeaUvawAAAABJRU5ErkJggg==",
2751 TestStrIter->second);
2753 // Check that it has the correct encoding.
2755 TestFileIter = TestFile.LogosListPicEncType.find(0);
2756 ASSERT_NE(TestFile.LogosListPicEncType.end(), TestFileIter);
2757 ASSERT_EQ("base64", TestFileIter->second);
2759 // Check that it has the correct image type.
2761 TestFileIter = TestFile.LogosListPictureType.find(0);
2762 ASSERT_NE(TestFile.LogosListPictureType.end(), TestFileIter);
2763 ASSERT_EQ("image/png", TestFileIter->second);
2765 // Check the ALTID section.
2767 TestFileIter = TestFile.LogosListAltID.find(0);
2768 ASSERT_NE(TestFile.LogosListAltID.end(), TestFileIter);
2769 ASSERT_EQ("70", TestFileIter->second);
2771 // Check the PID section.
2773 TestFileIter = TestFile.LogosListPID.find(0);
2774 ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
2775 ASSERT_EQ("71", TestFileIter->second);
2777 // Check the TYPE section.
2779 // Check the MEDIATYPE section.
2781 TestFileIter = TestFile.LogosListMediatype.find(0);
2782 ASSERT_NE(TestFile.LogosListMediatype.end(), TestFileIter);
2783 ASSERT_EQ("image/png", TestFileIter->second);
2785 // Check the PREF section.
2787 TestFileIntIter = TestFile.LogosListPref.find(0);
2788 ASSERT_NE(TestFile.LogosListPref.end(), TestFileIntIter);
2789 ASSERT_EQ(72, TestFileIntIter->second);
2791 // Check the extra tokens.
2793 TestFileIter = TestFile.LogosListTokens.find(0);
2794 ASSERT_NE(TestFile.LogosListTokens.end(), TestFileIter);
2795 ASSERT_EQ("MEEP=MOO", TestFileIter->second);
2797 // Start with the second photo.
2799 TestStrIter = TestFile.LogosList.find(1);
2800 ASSERT_NE(TestFile.LogosList.end(), TestStrIter);
2801 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2NkYPjPgAr+owkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC",
2802 TestStrIter->second);
2804 // Check that it has the correct encoding.
2806 TestFileIter = TestFile.LogosListPicEncType.find(1);
2807 ASSERT_NE(TestFile.LogosListPicEncType.end(), TestFileIter);
2808 ASSERT_EQ("base64", TestFileIter->second);
2810 // Check that it has the correct image type.
2812 TestFileIter = TestFile.LogosListPictureType.find(1);
2813 ASSERT_NE(TestFile.LogosListPictureType.end(), TestFileIter);
2814 ASSERT_EQ("image/png", TestFileIter->second);
2816 // Check the ALTID section.
2818 TestFileIter = TestFile.LogosListAltID.find(1);
2819 ASSERT_NE(TestFile.LogosListAltID.end(), TestFileIter);
2820 ASSERT_EQ("20", TestFileIter->second);
2822 // Check the PID section.
2824 TestFileIter = TestFile.LogosListPID.find(1);
2825 ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
2826 ASSERT_EQ("21", TestFileIter->second);
2828 // Check the TYPE section.
2830 TestFileIter = TestFile.LogosListType.find(1);
2831 ASSERT_NE(TestFile.LogosListType.end(), TestFileIter);
2832 ASSERT_EQ("home", TestFileIter->second);
2834 // Check the MEDIATYPE section.
2836 TestFileIter = TestFile.LogosListMediatype.find(1);
2837 ASSERT_NE(TestFile.LogosListMediatype.end(), TestFileIter);
2838 ASSERT_EQ("image/png", TestFileIter->second);
2840 // Check the PREF section.
2842 TestFileIntIter = TestFile.LogosListPref.find(1);
2843 ASSERT_NE(TestFile.LogosListPref.end(), TestFileIntIter);
2844 ASSERT_EQ(22, TestFileIntIter->second);
2846 // Check the extra tokens.
2848 TestFileIter = TestFile.LogosListTokens.find(1);
2849 ASSERT_NE(TestFile.LogosListTokens.end(), TestFileIter);
2850 ASSERT_EQ("BEEP=BOOP", TestFileIter->second);
2852 // Start with the second photo.
2854 TestStrIter = TestFile.LogosList.find(2);
2855 ASSERT_NE(TestFile.LogosList.end(), TestStrIter);
2856 ASSERT_EQ("iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm53EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=",
2857 TestStrIter->second);
2859 // Check that it has the correct encoding.
2861 TestFileIter = TestFile.LogosListPicEncType.find(2);
2862 ASSERT_NE(TestFile.LogosListPicEncType.end(), TestFileIter);
2863 ASSERT_EQ("base64", TestFileIter->second);
2865 // Check that it has the correct image type.
2867 TestFileIter = TestFile.LogosListPictureType.find(2);
2868 ASSERT_NE(TestFile.LogosListPictureType.end(), TestFileIter);
2869 ASSERT_EQ("image/png", TestFileIter->second);
2871 // Check the ALTID section.
2873 TestFileIter = TestFile.LogosListAltID.find(2);
2874 ASSERT_NE(TestFile.LogosListAltID.end(), TestFileIter);
2875 ASSERT_EQ("90", TestFileIter->second);
2877 // Check the PID section.
2879 TestFileIter = TestFile.LogosListPID.find(2);
2880 ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
2881 ASSERT_EQ("91", TestFileIter->second);
2883 // Check the TYPE section.
2885 TestFileIter = TestFile.LogosListType.find(2);
2886 ASSERT_NE(TestFile.LogosListType.end(), TestFileIter);
2887 ASSERT_EQ("work", TestFileIter->second);
2889 // Check the MEDIATYPE section.
2891 TestFileIter = TestFile.LogosListMediatype.find(2);
2892 ASSERT_NE(TestFile.LogosListMediatype.end(), TestFileIter);
2893 ASSERT_EQ("image/png", TestFileIter->second);
2895 // Check the PREF section.
2897 TestFileIntIter = TestFile.LogosListPref.find(2);
2898 ASSERT_NE(TestFile.LogosListPref.end(), TestFileIntIter);
2899 ASSERT_EQ(92, TestFileIntIter->second);
2901 // Check the extra tokens.
2903 TestFileIter = TestFile.LogosListTokens.find(2);
2904 ASSERT_NE(TestFile.LogosListTokens.end(), TestFileIter);
2905 ASSERT_EQ("LOGO=YUP", TestFileIter->second);
2909 TEST(ContactLoad, SoundTests){
2911 // Setup the sound files first.
2913 ContactDataObject TestFile;
2915 // Check that the vCard 4.0 file loads OK.
2917 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
2919 std::map<int,std::string>::iterator TestStrIter;
2920 std::map<int,wxString>::iterator TestFileIter;
2921 std::map<int,int>::iterator TestFileIntIter;
2923 // Sound File A: Morse code X.
2925 std::string SoundA = "T2dnUwACAAAAAAAAAAAqlr5kAAAAAPjSH5UBHgF2b3"
2926 "JiaXMAAAAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAAKpa+ZAEAAAAJVIuhDzz//"
2927 "///////////////MgN2b3JiaXMsAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxNTAxMDUgKOKb"
2928 "hOKbhOKbhOKbhCkAAAAAAQV2b3JiaXMfQkNWAQAAAQAYY1QpRplS0kqJGXOUMUaZYpJKiaWEFkJ"
2929 "InXMUU6k515xrrLm1IIQQGlNQKQWZUo5SaRljkCkFmVIQS0kldBI6J51jEFtJwdaYa4tBthyEDZ"
2930 "pSTCnElFKKQggZU4wpxZRSSkIHJXQOOuYcU45KKEG4nHOrtZaWY4updJJK5yRkTEJIKYWSSgelU"
2931 "05CSDWW1lIpHXNSUmpB6CCEEEK2IIQNgtCQVQAAAQDAQBAasgoAUAAAEIqhGIoChIasAgAyAAAE"
2932 "oCiO4iiOIzmSY0kWEBqyCgAAAgAQAADAcBRJkRTJsSRL0ixL00RRVX3VNlVV9nVd13Vd13UgNGQ"
2933 "VAAABAEBIp5mlGiDCDGQYCA1ZBQAgAAAARijCEANCQ1YBAAABAABiKDmIJrTmfHOOg2Y5aCrF5n"
2934 "RwItXmSW4q5uacc845J5tzxjjnnHOKcmYxaCa05pxzEoNmKWgmtOacc57E5kFrqrTmnHPGOaeDc"
2935 "UYY55xzmrTmQWo21uaccxa0pjlqLsXmnHMi5eZJbS7V5pxzzjnnnHPOOeecc6oXp3NwTjjnnHOi"
2936 "9uZabkIX55xzPhmne3NCOOecc84555xzzjnnnHOC0JBVAAAQAABBGDaGcacgSJ+jgRhFiGnIpAf"
2937 "do8MkaAxyCqlHo6ORUuoglFTGSSmdIDRkFQAACAAAIYQUUkghhRRSSCGFFFKIIYYYYsgpp5yCCi"
2938 "qppKKKMsoss8wyyyyzzDLrsLPOOuwwxBBDDK20EktNtdVYY62555xrDtJaaa211koppZRSSikID"
2939 "VkFAIAAABAIGWSQQUYhhRRSiCGmnHLKKaigAkJDVgEAgAAAAgAAADzJc0RHdERHdERHdERHdETH"
2940 "czxHlERJlERJtEzL1ExPFVXVlV1b1mXd9m1hF3bd93Xf93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mWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAAGHAAAAgw"
2968 "oQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklIIoZSUWgs"
2969 "hlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54miaaqqbV"
2970 "ueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumqqqq68quL"
2971 "PvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyOcFI0Flho"
2972 "yEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSimllFJKKaW"
2973 "UUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllF"
2974 "JKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSS"
2975 "imllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkop"
2976 "pZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaW"
2977 "UUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllF"
2978 "JKKaWUUkoplVJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKK"
2979 "aWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSCgCQinAAkHowoQwUGrISAEgF"
2980 "AACMUUopxpyDEDHmGGPQSSgpYsw5xhyUklLlHIQQUmktt8o5CCGk1FJtmXNSWosx5hgz56SkFFv"
2981 "NOYdSUoux5ppr7qS0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mEydtEiYWQVcSz"
3074 "iOHhL/sa+//nrh7Pz5KpgmpFCzBf7yBGINzZMCz5v33LC5yULV09Hr9rpCSq8fgadW7ODN463Xb"
3075 "RYbSNagn5oxALC2vr6uE5P38IBXIdW4jdSAxJ3hAqoAjAIYBecxAA==";
3077 // Sound B: Morse Code S.
3079 std::string SoundB = "T2dnUwACAAAAAAAAAAAoPAxpAAAAAER0X7"
3080 "YBHgF2b3JiaXMAAAAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAAKDwMaQEAAAA2m"
3081 "nO/Dzz/////////////////MgN2b3JiaXMsAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxNTAx"
3082 "MDUgKOKbhOKbhOKbhOKbhCkAAAAAAQV2b3JiaXMfQkNWAQAAAQAYY1QpRplS0kqJGXOUMUaZYpJ"
3083 "KiaWEFkJInXMUU6k515xrrLm1IIQQGlNQKQWZUo5SaRljkCkFmVIQS0kldBI6J51jEFtJwdaYa4"
3084 "tBthyEDZpSTCnElFKKQggZU4wpxZRSSkIHJXQOOuYcU45KKEG4nHOrtZaWY4updJJK5yRkTEJIK"
3085 "YWSSgelU05CSDWW1lIpHXNSUmpB6CCEEEK2IIQNgtCQVQAAAQDAQBAasgoAUAAAEIqhGIoChIas"
3086 "AgAyAAAEoCiO4iiOIzmSY0kWEBqyCgAAAgAQAADAcBRJkRTJsSRL0ixL00RRVX3VNlVV9nVd13V"
3087 "d13UgNGQVAAABAEBIp5mlGiDCDGQYCA1ZBQAgAAAARijCEANCQ1YBAAABAABiKDmIJrTmfHOOg2"
3088 "Y5aCrF5nRwItXmSW4q5uacc845J5tzxjjnnHOKcmYxaCa05pxzEoNmKWgmtOacc57E5kFrqrTmn"
3089 "HPGOaeDcUYY55xzmrTmQWo21uaccxa0pjlqLsXmnHMi5eZJbS7V5pxzzjnnnHPOOeecc6oXp3Nw"
3090 "TjjnnHOi9uZabkIX55xzPhmne3NCOOecc84555xzzjnnnHOC0JB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a55mmaZqybJqqK1uep5qeKKqq5ommaqqqLJumqsqW55mqJ4qq6omea5qqKsumatqq"
3118 "aZq2bKqqLZumKsuubfu+68qybqqqbJuqauumasqybMu+78qq7oqmKcumqtqyaaqyLduy78uyrPu"
3119 "iacqyaaqybaqqLsuybRuzbPu6aJqybaqmLZuqKtuyLfu6LNu678qub6uqrOuyLfu67vqucOu6ML"
3120 "yybPuqrPq6K9u6b+sy2/Z9RNOUZVM1bdtUVVl2Zdn2Zdv2fdE0bVtVVVs2TdW2ZVn2fVm2bWE0T"
3121 "dk2VVXWTdW0bVmWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAA"
3122 "GHAAAAgwoQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklI"
3123 "IoZSUWgshlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54"
3124 "miaaqqbVueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumq"
3125 "qqq68quLPvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyO"
3126 "cFI0FlhoyEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSim"
3127 "llFJKKaWUUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZ"
3128 "RSSimllFJKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUU"
3129 "koppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJK"
3130 "KaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSim"
3131 "llFJKKaWUUk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678qub6uqrOuyLfu67vqucOu6ML"
3229 "yybPuqrPq6K9u6b+sy2/Z9RNOUZVM1bdtUVVl2Zdn2Zdv2fdE0bVtVVVs2TdW2ZVn2fVm2bWE0T"
3230 "dk2VVXWTdW0bVmWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAA"
3231 "GHAAAAgwoQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklI"
3232 "IoZSUWgshlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54"
3233 "miaaqqbVueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumq"
3234 "qqq68quLPvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyO"
3235 "cFI0FlhoyEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSim"
3236 "llFJKKaWUUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZ"
3237 "RSSimllFJKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUU"
3238 "koppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJK"
3239 "KaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSim"
3240 "llFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZ"
3241 "RSSimllFJKKaWUUkoplVJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSS"
3242 "imllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWU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Ym68BRE/EPff27gIUYf0bKt2rNvW/42tu1iZ8NiFaaXsyhwd0Xfexu4DlWACxPT"
3297 "uToUONMqDn5j1qm6nODTalkgKaS1/tU+raTY8jJcMZEi4ARLkcTpoF6OcOqKvtmjl9+vQ/xlKpB"
3298 "GIAIK9zQ/RCPelN7nQ5NPxMPV7u4x4NkonrkqGxKq4P1BSeipGC27qrrpiU+H+O2xmyxXVjTART"
3299 "S6eyc3uoMvHpgrKTs0FFWi2ypCYnnvks9H9NhOfS2GjfltH61uk9FWI93ls/1a3UeUwHSjIcTgo"
3300 "AIkXlhFkA/QAAUIBPlxkBQAvxEPHZM/T44bVSEz77DNivKlRDL2eYmwd77x0NJm6YVP9cZEJoMq"
3301 "6qnUz2EHaJnRZpzS1radsrMiKHeodrQ30sIQKDKCNkrwtaOz35knCjAQZZJnTpAd5bP9Wt1LlMB"
3302 "SUJTpBwASCwHA5HAdwXAaAoRNN7MgAKgEJzeSImylPNih8Sm+w5Xa4eV8b3YFJBnpqsMctUfMsK"
3303 "89gkEUtLTvHhUU8NifkeMgU+bNOlqDHhHD0cz1udkYgLMpGQNde4htA9Pds1HHezoitB5xAeC9/"
3304 "tRcpa4QNHAVYD+P9+GBogQa3MHFanBEXy8f8FHJp9q/eHVTvb/Dxhd8oXbYLZ7bY9XnmdSy5MvT"
3305 "oTbkW8W39ptMq5bR0+Z2XrPWTnwamtqY4eKow4NQ35rOiaKk49EpYoqYecozQYDhT04juULDYbJ"
3306 "n7IXeksuXpi2v2irciAXICHx2PAvM4SVoUKcberP+c9c+Pj7unVvPkyBqbwKmHWBSOj4S4e7W5o"
3307 "SH9nHhrW1jnyCtQZClVD86hh6E7vpEDb8Ny+AbwuSlI+b4KyFDt6/fEADBnCOeFgDID42jkBQ+w"
3308 "FjNEAGMJtbcK5WgAODg==";
3310 // Start with Sound A.
3312 TestStrIter = TestFile.SoundsList.find(0);
3313 ASSERT_NE(TestFile.SoundsList.end(), TestStrIter);
3314 ASSERT_EQ(SoundA, TestStrIter->second);
3316 // Check that it has the correct encoding.
3318 TestFileIter = TestFile.SoundsListAudioEncType.find(0);
3319 ASSERT_NE(TestFile.SoundsListAudioEncType.end(), TestFileIter);
3320 ASSERT_EQ("base64", TestFileIter->second);
3322 // Check that it has the correct image type.
3324 TestFileIter = TestFile.SoundsListAudioType.find(0);
3325 ASSERT_NE(TestFile.SoundsListAudioType.end(), TestFileIter);
3326 ASSERT_EQ("application/ogg", TestFileIter->second);
3328 // Check the ALTID section.
3330 TestFileIter = TestFile.SoundsListAltID.find(0);
3331 ASSERT_NE(TestFile.SoundsListAltID.end(), TestFileIter);
3332 ASSERT_EQ("4", TestFileIter->second);
3334 // Check the PID section.
3336 TestFileIter = TestFile.SoundsListPID.find(0);
3337 ASSERT_NE(TestFile.SoundsListPID.end(), TestFileIter);
3338 ASSERT_EQ("1", TestFileIter->second);
3340 // Check the MEDIATYPE section.
3342 TestFileIter = TestFile.SoundsListMediatype.find(0);
3343 ASSERT_NE(TestFile.SoundsListMediatype.end(), TestFileIter);
3344 ASSERT_EQ("application/ogg", TestFileIter->second);
3346 // Check the TYPE section.
3348 TestFileIter = TestFile.SoundsListType.find(0);
3349 ASSERT_EQ(TestFile.SoundsListType.end(), TestFileIter);
3351 // Check the LANGUAGE section.
3353 TestFileIter = TestFile.SoundsListLanguage.find(0);
3354 ASSERT_NE(TestFile.SoundsListLanguage.end(), TestFileIter);
3355 ASSERT_EQ("kw", TestFileIter->second);
3357 // Check the PREF section.
3359 TestFileIntIter = TestFile.SoundsListPref.find(0);
3360 ASSERT_NE(TestFile.SoundsListPref.end(), TestFileIntIter);
3361 ASSERT_EQ(2, TestFileIntIter->second);
3363 // Check the extra tokens.
3365 TestFileIter = TestFile.SoundsListTokens.find(0);
3366 ASSERT_NE(TestFile.SoundsListTokens.end(), TestFileIter);
3367 ASSERT_EQ("MEEP=MOO", TestFileIter->second);
3369 // Start with Sound B.
3371 TestStrIter = TestFile.SoundsList.find(1);
3372 ASSERT_NE(TestFile.SoundsList.end(), TestStrIter);
3373 ASSERT_EQ(SoundB, TestStrIter->second);
3375 // Check that it has the correct encoding.
3377 TestFileIter = TestFile.SoundsListAudioEncType.find(1);
3378 ASSERT_NE(TestFile.SoundsListAudioEncType.end(), TestFileIter);
3379 ASSERT_EQ("base64", TestFileIter->second);
3381 // Check that it has the correct image type.
3383 TestFileIter = TestFile.SoundsListAudioType.find(1);
3384 ASSERT_NE(TestFile.SoundsListAudioType.end(), TestFileIter);
3385 ASSERT_EQ("application/ogg", TestFileIter->second);
3387 // Check the TYPE section.
3389 TestFileIter = TestFile.SoundsListType.find(1);
3390 ASSERT_NE(TestFile.SoundsListType.end(), TestFileIter);
3391 ASSERT_EQ("home", TestFileIter->second);
3393 // Check the ALTID section.
3395 TestFileIter = TestFile.SoundsListAltID.find(1);
3396 ASSERT_NE(TestFile.SoundsListAltID.end(), TestFileIter);
3397 ASSERT_EQ("24", TestFileIter->second);
3399 // Check the PID section.
3401 TestFileIter = TestFile.SoundsListPID.find(1);
3402 ASSERT_NE(TestFile.SoundsListPID.end(), TestFileIter);
3403 ASSERT_EQ("21", TestFileIter->second);
3405 // Check the MEDIATYPE section.
3407 TestFileIter = TestFile.SoundsListMediatype.find(1);
3408 ASSERT_NE(TestFile.SoundsListMediatype.end(), TestFileIter);
3409 ASSERT_EQ("application/ogg", TestFileIter->second);
3411 // Check the LANGUAGE section.
3413 TestFileIter = TestFile.SoundsListLanguage.find(1);
3414 ASSERT_NE(TestFile.SoundsListLanguage.end(), TestFileIter);
3415 ASSERT_EQ("kw", TestFileIter->second);
3417 // Check the PREF section.
3419 TestFileIntIter = TestFile.SoundsListPref.find(1);
3420 ASSERT_NE(TestFile.SoundsListPref.end(), TestFileIntIter);
3421 ASSERT_EQ(22, TestFileIntIter->second);
3423 // Check the extra tokens.
3425 TestFileIter = TestFile.SoundsListTokens.find(1);
3426 ASSERT_NE(TestFile.SoundsListTokens.end(), TestFileIter);
3427 ASSERT_EQ("SOUND=WAVE", TestFileIter->second);
3429 // Start with Sound C.
3431 TestStrIter = TestFile.SoundsList.find(2);
3432 ASSERT_NE(TestFile.SoundsList.end(), TestStrIter);
3433 ASSERT_EQ(SoundC, TestStrIter->second);
3435 // Check that it has the correct encoding.
3437 TestFileIter = TestFile.SoundsListAudioEncType.find(2);
3438 ASSERT_NE(TestFile.SoundsListAudioEncType.end(), TestFileIter);
3439 ASSERT_EQ("base64", TestFileIter->second);
3441 // Check that it has the correct image type.
3443 TestFileIter = TestFile.SoundsListAudioType.find(2);
3444 ASSERT_NE(TestFile.SoundsListAudioType.end(), TestFileIter);
3445 ASSERT_EQ("application/ogg", TestFileIter->second);
3447 // Check the TYPE section.
3449 TestFileIter = TestFile.SoundsListType.find(2);
3450 ASSERT_NE(TestFile.SoundsListType.end(), TestFileIter);
3451 ASSERT_EQ("work", TestFileIter->second);
3453 // Check the ALTID section.
3455 TestFileIter = TestFile.SoundsListAltID.find(2);
3456 ASSERT_NE(TestFile.SoundsListAltID.end(), TestFileIter);
3457 ASSERT_EQ("44", TestFileIter->second);
3459 // Check the PID section.
3461 TestFileIter = TestFile.SoundsListPID.find(2);
3462 ASSERT_NE(TestFile.SoundsListPID.end(), TestFileIter);
3463 ASSERT_EQ("41", TestFileIter->second);
3465 // Check the MEDIATYPE section.
3467 TestFileIter = TestFile.SoundsListMediatype.find(2);
3468 ASSERT_NE(TestFile.SoundsListMediatype.end(), TestFileIter);
3469 ASSERT_EQ("application/ogg", TestFileIter->second);
3471 // Check the LANGUAGE section.
3473 TestFileIter = TestFile.SoundsListLanguage.find(2);
3474 ASSERT_NE(TestFile.SoundsListLanguage.end(), TestFileIter);
3475 ASSERT_EQ("kw", TestFileIter->second);
3477 // Check the PREF section.
3479 TestFileIntIter = TestFile.SoundsListPref.find(2);
3480 ASSERT_NE(TestFile.SoundsListPref.end(), TestFileIntIter);
3481 ASSERT_EQ(42, TestFileIntIter->second);
3483 // Check the extra tokens.
3485 TestFileIter = TestFile.SoundsListTokens.find(2);
3486 ASSERT_NE(TestFile.SoundsListTokens.end(), TestFileIter);
3487 ASSERT_EQ("WAVE=SOUND", TestFileIter->second);
3491 TEST(ContactLoad, CalendarURITests){
3493 ContactDataObject TestFile;
3495 // Check that the vCard 4.0 file loads OK.
3497 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
3499 std::map<int,wxString>::iterator TestFileIter;
3500 std::map<int,int>::iterator TestFileIntIter;
3502 // Start with a general calendar address.
3504 TestFileIter = TestFile.CalendarList.find(0);
3505 ASSERT_NE(TestFile.CalendarList.end(), TestFileIter);
3506 ASSERT_EQ("http://example.com", TestFileIter->second);
3508 // Check the TYPE section.
3510 TestFileIter = TestFile.CalendarListType.find(0);
3511 ASSERT_EQ(TestFile.CalendarListType.end(), TestFileIter);
3513 // Check the ALTID section.
3515 TestFileIter = TestFile.CalendarListAltID.find(0);
3516 ASSERT_NE(TestFile.CalendarListAltID.end(), TestFileIter);
3517 ASSERT_EQ("34", TestFileIter->second);
3519 // Check the PID section.
3521 TestFileIter = TestFile.CalendarListPID.find(0);
3522 ASSERT_NE(TestFile.CalendarListPID.end(), TestFileIter);
3523 ASSERT_EQ("31", TestFileIter->second);
3525 // Check the MEDIATYPE section.
3527 TestFileIter = TestFile.CalendarListMediatype.find(0);
3528 ASSERT_NE(TestFile.CalendarListMediatype.end(), TestFileIter);
3529 ASSERT_EQ("text/plain", TestFileIter->second);
3531 // Check the PREF section.
3533 TestFileIntIter = TestFile.CalendarListPref.find(0);
3534 ASSERT_NE(TestFile.CalendarListPref.end(), TestFileIntIter);
3535 ASSERT_EQ(32, TestFileIntIter->second);
3537 // Check the extra tokens.
3539 TestFileIter = TestFile.CalendarListTokens.find(0);
3540 ASSERT_NE(TestFile.CalendarListTokens.end(), TestFileIter);
3541 ASSERT_EQ("CALENDARS=FLYING", TestFileIter->second);
3543 // Start with a home calendar address.
3545 TestFileIter = TestFile.CalendarList.find(1);
3546 ASSERT_NE(TestFile.CalendarList.end(), TestFileIter);
3547 ASSERT_EQ("http://example.com/home", TestFileIter->second);
3549 // Check the TYPE section.
3551 TestFileIter = TestFile.CalendarListType.find(1);
3552 ASSERT_NE(TestFile.CalendarListType.end(), TestFileIter);
3553 ASSERT_EQ("home", TestFileIter->second);
3555 // Check the ALTID section.
3557 TestFileIter = TestFile.CalendarListAltID.find(1);
3558 ASSERT_NE(TestFile.CalendarListAltID.end(), TestFileIter);
3559 ASSERT_EQ("44", TestFileIter->second);
3561 // Check the PID section.
3563 TestFileIter = TestFile.CalendarListPID.find(1);
3564 ASSERT_NE(TestFile.CalendarListPID.end(), TestFileIter);
3565 ASSERT_EQ("41", TestFileIter->second);
3567 // Check the MEDIATYPE section.
3569 TestFileIter = TestFile.CalendarListMediatype.find(1);
3570 ASSERT_NE(TestFile.CalendarListMediatype.end(), TestFileIter);
3571 ASSERT_EQ("text/dryplain", TestFileIter->second);
3573 // Check the PREF section.
3575 TestFileIntIter = TestFile.CalendarListPref.find(1);
3576 ASSERT_NE(TestFile.CalendarListPref.end(), TestFileIntIter);
3577 ASSERT_EQ(42, TestFileIntIter->second);
3579 // Check the extra tokens.
3581 TestFileIter = TestFile.CalendarListTokens.find(1);
3582 ASSERT_NE(TestFile.CalendarListTokens.end(), TestFileIter);
3583 ASSERT_EQ("CALENDARS=GROUNDED", TestFileIter->second);
3585 // Start with a business calendar address.
3587 TestFileIter = TestFile.CalendarList.find(2);
3588 ASSERT_NE(TestFile.CalendarList.end(), TestFileIter);
3589 ASSERT_EQ("http://example.com/business", TestFileIter->second);
3591 // Check the TYPE section.
3593 TestFileIter = TestFile.CalendarListType.find(2);
3594 ASSERT_NE(TestFile.CalendarListType.end(), TestFileIter);
3595 ASSERT_EQ("work", TestFileIter->second);
3597 // Check the ALTID section.
3599 TestFileIter = TestFile.CalendarListAltID.find(2);
3600 ASSERT_NE(TestFile.CalendarListAltID.end(), TestFileIter);
3601 ASSERT_EQ("54", TestFileIter->second);
3603 // Check the PID section.
3605 TestFileIter = TestFile.CalendarListPID.find(2);
3606 ASSERT_NE(TestFile.CalendarListPID.end(), TestFileIter);
3607 ASSERT_EQ("51", TestFileIter->second);
3609 // Check the MEDIATYPE section.
3611 TestFileIter = TestFile.CalendarListMediatype.find(2);
3612 ASSERT_NE(TestFile.CalendarListMediatype.end(), TestFileIter);
3613 ASSERT_EQ("text/stillwetink", TestFileIter->second);
3615 // Check the PREF section.
3617 TestFileIntIter = TestFile.CalendarListPref.find(2);
3618 ASSERT_NE(TestFile.CalendarListPref.end(), TestFileIntIter);
3619 ASSERT_EQ(52, TestFileIntIter->second);
3621 // Check the extra tokens.
3623 TestFileIter = TestFile.CalendarListTokens.find(2);
3624 ASSERT_NE(TestFile.CalendarListTokens.end(), TestFileIter);
3625 ASSERT_EQ("CALENDARS=CANCELLED", TestFileIter->second);
3629 TEST(ContactLoad, CalendarAddressURITests){
3631 ContactDataObject TestFile;
3633 // Check that the vCard 4.0 file loads OK.
3635 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
3637 std::map<int,wxString>::iterator TestFileIter;
3638 std::map<int,int>::iterator TestFileIntIter;
3640 // Start with a general calendar request address.
3642 TestFileIter = TestFile.CalendarRequestList.find(0);
3643 ASSERT_NE(TestFile.CalendarRequestList.end(), TestFileIter);
3644 ASSERT_EQ("http://example.com/request", TestFileIter->second);
3646 // Check the TYPE section.
3648 TestFileIter = TestFile.CalendarRequestListType.find(0);
3649 ASSERT_EQ(TestFile.CalendarRequestListType.end(), TestFileIter);
3651 // Check the ALTID section.
3653 TestFileIter = TestFile.CalendarRequestListAltID.find(0);
3654 ASSERT_NE(TestFile.CalendarRequestListAltID.end(), TestFileIter);
3655 ASSERT_EQ("14", TestFileIter->second);
3657 // Check the PID section.
3659 TestFileIter = TestFile.CalendarRequestListPID.find(0);
3660 ASSERT_NE(TestFile.CalendarRequestListPID.end(), TestFileIter);
3661 ASSERT_EQ("11", TestFileIter->second);
3663 // Check the MEDIATYPE section.
3665 TestFileIter = TestFile.CalendarRequestListMediatype.find(0);
3666 ASSERT_NE(TestFile.CalendarRequestListMediatype.end(), TestFileIter);
3667 ASSERT_EQ("text/plain", TestFileIter->second);
3669 // Check the PREF section.
3671 TestFileIntIter = TestFile.CalendarRequestListPref.find(0);
3672 ASSERT_NE(TestFile.CalendarRequestListPref.end(), TestFileIntIter);
3673 ASSERT_EQ(12, TestFileIntIter->second);
3675 // Check the extra tokens.
3677 TestFileIter = TestFile.CalendarRequestListTokens.find(0);
3678 ASSERT_NE(TestFile.CalendarRequestListTokens.end(), TestFileIter);
3679 ASSERT_EQ("REQUEST=YES", TestFileIter->second);
3681 // Start with a home calendar request address.
3683 TestFileIter = TestFile.CalendarRequestList.find(1);
3684 ASSERT_NE(TestFile.CalendarRequestList.end(), TestFileIter);
3685 ASSERT_EQ("http://example.com/home/request", TestFileIter->second);
3687 // Check the TYPE section.
3689 TestFileIter = TestFile.CalendarRequestListType.find(1);
3690 ASSERT_NE(TestFile.CalendarRequestListType.end(), TestFileIter);
3691 ASSERT_EQ("home", TestFileIter->second);
3693 // Check the ALTID section.
3695 TestFileIter = TestFile.CalendarRequestListAltID.find(1);
3696 ASSERT_NE(TestFile.CalendarRequestListAltID.end(), TestFileIter);
3697 ASSERT_EQ("24", TestFileIter->second);
3699 // Check the PID section.
3701 TestFileIter = TestFile.CalendarRequestListPID.find(1);
3702 ASSERT_NE(TestFile.CalendarRequestListPID.end(), TestFileIter);
3703 ASSERT_EQ("21", TestFileIter->second);
3705 // Check the MEDIATYPE section.
3707 TestFileIter = TestFile.CalendarRequestListMediatype.find(1);
3708 ASSERT_NE(TestFile.CalendarRequestListMediatype.end(), TestFileIter);
3709 ASSERT_EQ("text/dryplain", TestFileIter->second);
3711 // Check the PREF section.
3713 TestFileIntIter = TestFile.CalendarRequestListPref.find(1);
3714 ASSERT_NE(TestFile.CalendarRequestListPref.end(), TestFileIntIter);
3715 ASSERT_EQ(22, TestFileIntIter->second);
3717 // Check the extra tokens.
3719 TestFileIter = TestFile.CalendarRequestListTokens.find(1);
3720 ASSERT_NE(TestFile.CalendarRequestListTokens.end(), TestFileIter);
3721 ASSERT_EQ("REQUEST=MAYBE", TestFileIter->second);
3723 // Start with a business calendar request address.
3725 TestFileIter = TestFile.CalendarRequestList.find(2);
3726 ASSERT_NE(TestFile.CalendarRequestList.end(), TestFileIter);
3727 ASSERT_EQ("http://example.com/business/request", TestFileIter->second);
3729 // Check the TYPE section.
3731 TestFileIter = TestFile.CalendarRequestListType.find(2);
3732 ASSERT_NE(TestFile.CalendarRequestListType.end(), TestFileIter);
3733 ASSERT_EQ("work", TestFileIter->second);
3735 // Check the ALTID section.
3737 TestFileIter = TestFile.CalendarRequestListAltID.find(2);
3738 ASSERT_NE(TestFile.CalendarRequestListAltID.end(), TestFileIter);
3739 ASSERT_EQ("34", TestFileIter->second);
3741 // Check the PID section.
3743 TestFileIter = TestFile.CalendarRequestListPID.find(2);
3744 ASSERT_NE(TestFile.CalendarRequestListPID.end(), TestFileIter);
3745 ASSERT_EQ("31", TestFileIter->second);
3747 // Check the MEDIATYPE section.
3749 TestFileIter = TestFile.CalendarRequestListMediatype.find(2);
3750 ASSERT_NE(TestFile.CalendarRequestListMediatype.end(), TestFileIter);
3751 ASSERT_EQ("text/stillwetink", TestFileIter->second);
3753 // Check the PREF section.
3755 TestFileIntIter = TestFile.CalendarRequestListPref.find(2);
3756 ASSERT_NE(TestFile.CalendarRequestListPref.end(), TestFileIntIter);
3757 ASSERT_EQ(32, TestFileIntIter->second);
3759 // Check the extra tokens.
3761 TestFileIter = TestFile.CalendarRequestListTokens.find(2);
3762 ASSERT_NE(TestFile.CalendarRequestListTokens.end(), TestFileIter);
3763 ASSERT_EQ("REQUEST=NO", TestFileIter->second);
3767 TEST(ContactLoad, FreeBusyTests){
3769 ContactDataObject TestFile;
3771 // Check that the vCard 4.0 file loads OK.
3773 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
3775 std::map<int,wxString>::iterator TestFileIter;
3776 std::map<int,int>::iterator TestFileIntIter;
3778 // Start with a general calendar free busy address.
3780 TestFileIter = TestFile.FreeBusyList.find(0);
3781 ASSERT_NE(TestFile.FreeBusyList.end(), TestFileIter);
3782 ASSERT_EQ("http://example.com/freebusy", TestFileIter->second);
3784 // Check the TYPE section.
3786 TestFileIter = TestFile.FreeBusyListType.find(0);
3787 ASSERT_EQ(TestFile.FreeBusyListType.end(), TestFileIter);
3789 // Check the ALTID section.
3791 TestFileIter = TestFile.FreeBusyListAltID.find(0);
3792 ASSERT_NE(TestFile.FreeBusyListAltID.end(), TestFileIter);
3793 ASSERT_EQ("74", TestFileIter->second);
3795 // Check the PID section.
3797 TestFileIter = TestFile.FreeBusyListPID.find(0);
3798 ASSERT_NE(TestFile.FreeBusyListPID.end(), TestFileIter);
3799 ASSERT_EQ("71", TestFileIter->second);
3801 // Check the MEDIATYPE section.
3803 TestFileIter = TestFile.FreeBusyListMediatype.find(0);
3804 ASSERT_NE(TestFile.FreeBusyListMediatype.end(), TestFileIter);
3805 ASSERT_EQ("text/plain", TestFileIter->second);
3807 // Check the PREF section.
3809 TestFileIntIter = TestFile.FreeBusyListPref.find(0);
3810 ASSERT_NE(TestFile.FreeBusyListPref.end(), TestFileIntIter);
3811 ASSERT_EQ(72, TestFileIntIter->second);
3813 // Check the extra tokens.
3815 TestFileIter = TestFile.FreeBusyListTokens.find(0);
3816 ASSERT_NE(TestFile.FreeBusyListTokens.end(), TestFileIter);
3817 ASSERT_EQ("STATUS=OUT", TestFileIter->second);
3819 // Start with a home calendar free busy address.
3821 TestFileIter = TestFile.FreeBusyList.find(1);
3822 ASSERT_NE(TestFile.FreeBusyList.end(), TestFileIter);
3823 ASSERT_EQ("http://example.com/home/freebusy", TestFileIter->second);
3825 // Check the TYPE section.
3827 TestFileIter = TestFile.FreeBusyListType.find(1);
3828 ASSERT_NE(TestFile.FreeBusyListType.end(), TestFileIter);
3829 ASSERT_EQ("home", TestFileIter->second);
3831 // Check the ALTID section.
3833 TestFileIter = TestFile.FreeBusyListAltID.find(1);
3834 ASSERT_NE(TestFile.FreeBusyListAltID.end(), TestFileIter);
3835 ASSERT_EQ("84", TestFileIter->second);
3837 // Check the PID section.
3839 TestFileIter = TestFile.FreeBusyListPID.find(1);
3840 ASSERT_NE(TestFile.FreeBusyListPID.end(), TestFileIter);
3841 ASSERT_EQ("81", TestFileIter->second);
3843 // Check the MEDIATYPE section.
3845 TestFileIter = TestFile.FreeBusyListMediatype.find(1);
3846 ASSERT_NE(TestFile.FreeBusyListMediatype.end(), TestFileIter);
3847 ASSERT_EQ("text/dryplain", TestFileIter->second);
3849 // Check the PREF section.
3851 TestFileIntIter = TestFile.FreeBusyListPref.find(1);
3852 ASSERT_NE(TestFile.FreeBusyListPref.end(), TestFileIntIter);
3853 ASSERT_EQ(82, TestFileIntIter->second);
3855 // Check the extra tokens.
3857 TestFileIter = TestFile.FreeBusyListTokens.find(1);
3858 ASSERT_NE(TestFile.FreeBusyListTokens.end(), TestFileIter);
3859 ASSERT_EQ("STATUS=FREE", TestFileIter->second);
3861 // Start with a business calendar free busy address.
3863 TestFileIter = TestFile.FreeBusyList.find(2);
3864 ASSERT_NE(TestFile.FreeBusyList.end(), TestFileIter);
3865 ASSERT_EQ("http://example.com/business/freebusy", TestFileIter->second);
3867 // Check the TYPE section.
3869 TestFileIter = TestFile.FreeBusyListType.find(2);
3870 ASSERT_NE(TestFile.FreeBusyListType.end(), TestFileIter);
3871 ASSERT_EQ("work", TestFileIter->second);
3873 // Check the ALTID section.
3875 TestFileIter = TestFile.FreeBusyListAltID.find(2);
3876 ASSERT_NE(TestFile.FreeBusyListAltID.end(), TestFileIter);
3877 ASSERT_EQ("94", TestFileIter->second);
3879 // Check the PID section.
3881 TestFileIter = TestFile.FreeBusyListPID.find(2);
3882 ASSERT_NE(TestFile.FreeBusyListPID.end(), TestFileIter);
3883 ASSERT_EQ("91", TestFileIter->second);
3885 // Check the MEDIATYPE section.
3887 TestFileIter = TestFile.FreeBusyListMediatype.find(2);
3888 ASSERT_NE(TestFile.FreeBusyListMediatype.end(), TestFileIter);
3889 ASSERT_EQ("text/stillwetink", TestFileIter->second);
3891 // Check the PREF section.
3893 TestFileIntIter = TestFile.FreeBusyListPref.find(2);
3894 ASSERT_NE(TestFile.FreeBusyListPref.end(), TestFileIntIter);
3895 ASSERT_EQ(92, TestFileIntIter->second);
3897 // Check the extra tokens.
3899 TestFileIter = TestFile.FreeBusyListTokens.find(2);
3900 ASSERT_NE(TestFile.FreeBusyListTokens.end(), TestFileIter);
3901 ASSERT_EQ("STATUS=BUSY", TestFileIter->second);
3905 TEST(ContactLoad, KeyTests){
3907 ContactDataObject TestFile;
3909 wxString KeyA = "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdudVBHIHYyCgpt"
3910 "UU11QkZaL0JyWVJDQUN2cTNueUl4dXJPOFovMHcwQWdkeUdhN1d2cWRpdk5OWVdEM3dmZkgrSi83"
3911 "R2o1dkNOClJwWFQ5TVI4SEdmR0Jwai9hc0NsajltbjhnRENMcVZJaXFybXZXK3dHbnhBVWxFU05V"
3912 "T201cEx6NTRwTzBzOW0KYzJ5SDRkYWVYR3pRTXFLUit2TDZaTWpDc0pSRk1UWVAzSDlTMlBFaHFF"
3913 "MXl4TnBpRi9ZTS9jNGNOYmU5bEZsTgpKMnJ2QzA2bzZuMFlzYWtuZTk3bWlndGNyTUpZVDljVDF4"
3914 "cjB5YUhDekcrVXZqOG1RMnlGT0tpVEpxeGlCVEdhClRMWjJjTFBVZVFFbnpjSWNwNnhVTitQZlZY"
3915 "ZzNNVllHWUZQakk0aUg0anNCQUFDc1BEMmpYSExnYVVzLzJ5VHUKNVF4M1RKSHljVTArOXZidC85"
3916 "VDJKdGt3c1R5SXlqQnJ0eGd6QVFERENaaFZoNU5oOFJuSWlSRDFzMzNmN1RoZgp4eENUMU0yWHI3"
3917 "dWh1WVFTZ1FmNUFRYkFscDZpUk9xTms5VV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FMmdJb2ZuaDk0CjdKeUh"
4024 "aNDUyTERkamZXQ1BZWFU9Cj16T3NxCi0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS"
4027 // Check that the vCard 4.0 file loads OK.
4029 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
4031 std::map<int,wxString>::iterator TestFileIter;
4032 std::map<int,int>::iterator TestFileIntIter;
4034 // Start with a general key.
4036 TestFileIter = TestFile.KeyList.find(0);
4037 ASSERT_NE(TestFile.KeyList.end(), TestFileIter);
4038 ASSERT_EQ(KeyA, TestFileIter->second);
4040 // Check the encoding type.
4042 TestFileIter = TestFile.KeyListDataEncType.find(0);
4043 ASSERT_NE(TestFile.KeyListDataEncType.end(), TestFileIter);
4044 ASSERT_EQ("base64", TestFileIter->second.ToStdString());
4046 // Check the file type.
4048 TestFileIter = TestFile.KeyListDataType.find(0);
4049 ASSERT_NE(TestFile.KeyListDataType.end(), TestFileIter);
4050 ASSERT_EQ("application/pgp-keys", TestFileIter->second);
4052 // Check the TYPE section.
4054 TestFileIter = TestFile.KeyListType.find(0);
4055 ASSERT_EQ(TestFile.KeyListType.end(), TestFileIter);
4057 // Check the ALTID section.
4059 TestFileIter = TestFile.KeyListAltID.find(0);
4060 ASSERT_NE(TestFile.KeyListAltID.end(), TestFileIter);
4061 ASSERT_EQ("54", TestFileIter->second);
4063 // Check the PID section.
4065 TestFileIter = TestFile.KeyListPID.find(0);
4066 ASSERT_NE(TestFile.KeyListPID.end(), TestFileIter);
4067 ASSERT_EQ("51", TestFileIter->second);
4069 // Check the PREF section.
4071 TestFileIntIter = TestFile.KeyListPref.find(0);
4072 ASSERT_NE(TestFile.KeyListPref.end(), TestFileIntIter);
4073 ASSERT_EQ(52, TestFileIntIter->second);
4075 // Check the extra tokens.
4077 TestFileIter = TestFile.KeyListTokens.find(0);
4078 ASSERT_NE(TestFile.KeyListTokens.end(), TestFileIter);
4079 ASSERT_EQ("KEYS=JUSTONE", TestFileIter->second);
4081 // Start with a work key.
4083 TestFileIter = TestFile.KeyList.find(1);
4084 ASSERT_NE(TestFile.KeyList.end(), TestFileIter);
4085 ASSERT_EQ(KeyB, TestFileIter->second);
4087 // Check the encoding type.
4089 TestFileIter = TestFile.KeyListDataEncType.find(1);
4090 ASSERT_NE(TestFile.KeyListDataEncType.end(), TestFileIter);
4091 ASSERT_EQ("base64", TestFileIter->second.ToStdString());
4093 // Check the file type.
4095 TestFileIter = TestFile.KeyListDataType.find(1);
4096 ASSERT_NE(TestFile.KeyListDataType.end(), TestFileIter);
4097 ASSERT_EQ("application/pgp-keys", TestFileIter->second);
4099 // Check the TYPE section.
4101 TestFileIter = TestFile.KeyListType.find(1);
4102 ASSERT_NE(TestFile.KeyListType.end(), TestFileIter);
4103 ASSERT_EQ("home", TestFileIter->second);
4105 // Check the ALTID section.
4107 TestFileIter = TestFile.KeyListAltID.find(1);
4108 ASSERT_NE(TestFile.KeyListAltID.end(), TestFileIter);
4109 ASSERT_EQ("64", TestFileIter->second);
4111 // Check the PID section.
4113 TestFileIter = TestFile.KeyListPID.find(1);
4114 ASSERT_NE(TestFile.KeyListPID.end(), TestFileIter);
4115 ASSERT_EQ("61", TestFileIter->second);
4117 // Check the PREF section.
4119 TestFileIntIter = TestFile.KeyListPref.find(1);
4120 ASSERT_NE(TestFile.KeyListPref.end(), TestFileIntIter);
4121 ASSERT_EQ(62, TestFileIntIter->second);
4123 // Check the extra tokens.
4125 TestFileIter = TestFile.KeyListTokens.find(1);
4126 ASSERT_NE(TestFile.KeyListTokens.end(), TestFileIter);
4127 ASSERT_EQ("KEYS=NONE", TestFileIter->second);
4129 // Start with a business key.
4131 TestFileIter = TestFile.KeyList.find(2);
4132 ASSERT_NE(TestFile.KeyList.end(), TestFileIter);
4133 ASSERT_EQ(KeyC, TestFileIter->second);
4135 // Check the encoding type.
4137 TestFileIter = TestFile.KeyListDataEncType.find(2);
4138 ASSERT_NE(TestFile.KeyListDataEncType.end(), TestFileIter);
4139 ASSERT_EQ("base64", TestFileIter->second.ToStdString());
4141 // Check the file type.
4143 TestFileIter = TestFile.KeyListDataType.find(2);
4144 ASSERT_NE(TestFile.KeyListDataType.end(), TestFileIter);
4145 ASSERT_EQ("application/pgp-keys", TestFileIter->second);
4147 // Check the TYPE section.
4149 TestFileIter = TestFile.KeyListType.find(2);
4150 ASSERT_NE(TestFile.KeyListType.end(), TestFileIter);
4151 ASSERT_EQ("work", TestFileIter->second);
4153 // Check the ALTID section.
4155 TestFileIter = TestFile.KeyListAltID.find(2);
4156 ASSERT_NE(TestFile.KeyListAltID.end(), TestFileIter);
4157 ASSERT_EQ("74", TestFileIter->second);
4159 // Check the PID section.
4161 TestFileIter = TestFile.KeyListPID.find(2);
4162 ASSERT_NE(TestFile.KeyListPID.end(), TestFileIter);
4163 ASSERT_EQ("71", TestFileIter->second);
4165 // Check the PREF section.
4167 TestFileIntIter = TestFile.KeyListPref.find(2);
4168 ASSERT_NE(TestFile.KeyListPref.end(), TestFileIntIter);
4169 ASSERT_EQ(72, TestFileIntIter->second);
4171 // Check the extra tokens.
4173 TestFileIter = TestFile.KeyListTokens.find(2);
4174 ASSERT_NE(TestFile.KeyListTokens.end(), TestFileIter);
4175 ASSERT_EQ("KEYS=MISSING", TestFileIter->second);
4179 TEST(ContactLoad, VendorTests){
4181 ContactDataObject TestFile;
4183 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
4185 std::map<int,wxString>::iterator TestFileIter;
4186 std::map<int,int>::iterator TestFileIntIter;
4188 // Start with the first vendor namespace.
4190 TestFileIter = TestFile.VendorList.find(0);
4191 ASSERT_NE(TestFile.VendorList.end(), TestFileIter);
4192 ASSERT_EQ("Lemon", TestFileIter->second);
4194 TestFileIter = TestFile.VendorListPEN.find(0);
4195 ASSERT_NE(TestFile.VendorListPEN.end(), TestFileIter);
4196 ASSERT_EQ("696", TestFileIter->second);
4198 TestFileIter = TestFile.VendorListElement.find(0);
4199 ASSERT_NE(TestFile.VendorListElement.end(), TestFileIter);
4200 ASSERT_EQ("CAKE", TestFileIter->second);
4202 // Start with the second vendor namespace.
4204 TestFileIter = TestFile.VendorList.find(1);
4205 ASSERT_NE(TestFile.VendorList.end(), TestFileIter);
4206 ASSERT_EQ("Orange", TestFileIter->second);
4208 TestFileIter = TestFile.VendorListPEN.find(1);
4209 ASSERT_NE(TestFile.VendorListPEN.end(), TestFileIter);
4210 ASSERT_EQ("696", TestFileIter->second);
4212 TestFileIter = TestFile.VendorListElement.find(1);
4213 ASSERT_NE(TestFile.VendorListElement.end(), TestFileIter);
4214 ASSERT_EQ("DRINK", TestFileIter->second);
4216 // Start with the third vendor namespace.
4218 TestFileIter = TestFile.VendorList.find(2);
4219 ASSERT_NE(TestFile.VendorList.end(), TestFileIter);
4220 ASSERT_EQ("Shiena Nishizawa", TestFileIter->second);
4222 TestFileIter = TestFile.VendorListPEN.find(2);
4223 ASSERT_NE(TestFile.VendorListPEN.end(), TestFileIter);
4224 ASSERT_EQ("696", TestFileIter->second);
4226 TestFileIter = TestFile.VendorListElement.find(2);
4227 ASSERT_NE(TestFile.VendorListElement.end(), TestFileIter);
4228 ASSERT_EQ("MUSIC", TestFileIter->second);
4232 TEST(ContactLoad, XTokenTest){
4234 ContactDataObject TestFile;
4236 ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf"));
4238 std::map<int,wxString>::iterator TestFileIter;
4239 std::map<int,int>::iterator TestFileIntIter;
4241 // Three X-FARM variables.
4243 TestFileIter = TestFile.XTokenList.find(0);
4244 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4245 ASSERT_EQ("Yard", TestFileIter->second);
4247 TestFileIter = TestFile.XTokenListTokens.find(0);
4248 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4249 ASSERT_EQ("FARM", TestFileIter->second);
4251 TestFileIter = TestFile.XTokenList.find(1);
4252 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4253 ASSERT_EQ("Animals", TestFileIter->second);
4255 TestFileIter = TestFile.XTokenListTokens.find(1);
4256 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4257 ASSERT_EQ("FARM", TestFileIter->second);
4259 TestFileIter = TestFile.XTokenList.find(2);
4260 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4261 ASSERT_EQ("Shed", TestFileIter->second);
4263 TestFileIter = TestFile.XTokenListTokens.find(2);
4264 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4265 ASSERT_EQ("FARM;LOCATION=Back;TYPE=Vehicles", TestFileIter->second.ToStdString());
4267 // Three X-DISKSERIAL variables.
4269 TestFileIter = TestFile.XTokenList.find(3);
4270 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4271 ASSERT_EQ("14444", TestFileIter->second);
4273 TestFileIter = TestFile.XTokenListTokens.find(3);
4274 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4275 ASSERT_EQ("DISKSERIAL", TestFileIter->second);
4277 TestFileIter = TestFile.XTokenList.find(4);
4278 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4279 ASSERT_EQ("7555", TestFileIter->second);
4281 TestFileIter = TestFile.XTokenListTokens.find(4);
4282 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4283 ASSERT_EQ("DISKSERIAL", TestFileIter->second);
4285 TestFileIter = TestFile.XTokenList.find(5);
4286 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4287 ASSERT_EQ("3250539032590", TestFileIter->second);
4289 TestFileIter = TestFile.XTokenListTokens.find(5);
4290 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4291 ASSERT_EQ("DISKSERIAL;STATUS=DESTROYED;TYPE=FLASH", TestFileIter->second.ToStdString());
4293 // Three X-FOODS variables.
4295 TestFileIter = TestFile.XTokenList.find(6);
4296 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4297 ASSERT_EQ("Lemon Cake", TestFileIter->second);
4299 TestFileIter = TestFile.XTokenListTokens.find(6);
4300 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4301 ASSERT_EQ("FOODS;STATUS=HIGH", TestFileIter->second);
4303 TestFileIter = TestFile.XTokenList.find(7);
4304 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4305 ASSERT_EQ("Starrey Gazey Pie", TestFileIter->second);
4307 TestFileIter = TestFile.XTokenListTokens.find(7);
4308 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4309 ASSERT_EQ("FOODS;STATUS=LOW", TestFileIter->second);
4311 TestFileIter = TestFile.XTokenList.find(8);
4312 ASSERT_NE(TestFile.XTokenList.end(), TestFileIter);
4313 ASSERT_EQ("Cornish Pasties", TestFileIter->second);
4315 TestFileIter = TestFile.XTokenListTokens.find(8);
4316 ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
4317 ASSERT_EQ("FOODS;STATUS=FAVOURITE;TYPE=CHEESEANDONION", TestFileIter->second.ToStdString());