X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Ftests%2Fxestiaab_contactload.h;h=f40eeb993ae248d12f0facee9f2b45413897261a;hp=1820bbf84e61ed334c7a1ce5494e5decc30797e9;hb=702ac5127f25499fcd966ae5d9bbc9a6c8e37299;hpb=d0aff1878b93bd25d923176e4e18829b7040da1c diff --git a/source/tests/xestiaab_contactload.h b/source/tests/xestiaab_contactload.h index 1820bbf..f40eeb9 100644 --- a/source/tests/xestiaab_contactload.h +++ b/source/tests/xestiaab_contactload.h @@ -21,7 +21,6 @@ TEST(ContactLoad, ContactLoadTests){ - ContactDataObject TestFile; // Check that the file given is not missing. @@ -44,6 +43,39 @@ TEST(ContactLoad, ContactLoadTests){ // Check that the vCard 4.0 file loads OK. ASSERT_EQ(CONTACTLOAD_OK, TestFile.LoadFile("LoadCheck-Load4.vcf")); + + // Check that the kind status has been set. (KIND). + + ASSERT_NE(CONTACTKIND_NONE, TestFile.ContactKind); + ASSERT_EQ(CONTACTKIND_INDIVIDUAL, TestFile.ContactKind); + + // Check that the groups have been read (MEMBER). + + std::map::iterator TestFileIter; + std::map::iterator TestFileIntIter; + + TestFileIter = TestFile.GroupsList.find(0); + + ASSERT_NE(TestFile.GroupsList.end(), TestFileIter); + ASSERT_EQ("7a2af44d-6431-4797-a55f-d86d56304fda", TestFileIter->second); + + // Check the ALTID parameter. + + TestFileIter = TestFile.GroupsListAltID.find(0); + ASSERT_NE(TestFile.GroupsListAltID.end(), TestFileIter); + ASSERT_EQ("35", TestFileIter->second); + + // Check the PID parameter. + + TestFileIter = TestFile.GroupsListPID.find(0); + ASSERT_NE(TestFile.GroupsListPID.end(), TestFileIter); + ASSERT_EQ("40", TestFileIter->second); + + // Check the PREF parameter. + + TestFileIntIter = TestFile.GroupsListPref.find(0); + ASSERT_NE(TestFile.GroupsListPref.end(), TestFileIntIter); + ASSERT_EQ(45, TestFileIntIter->second); }