Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Refined tests and data for IMPP.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Jan 2016 23:08:06 +0000 (23:08 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Jan 2016 23:08:06 +0000 (23:08 +0000)
source/tests/LoadCheck-Load4.vcf
source/tests/xestiaab_contactload.h

index 1b0b0d7..6d312ce 100644 (file)
@@ -53,12 +53,12 @@ ADR;TYPE=work;LABEL="7 Flyby Drive\nElaine\nCornwall\nPL84 9YE\nCornwall\nUn
 EMAIL;ALTID=10;PID=20;PREF=40;WONDERFUL=Colour:moo@example.com
 EMAIL;TYPE=home;ALTID=5;PID=10;PREF=20;PEACE=quiet:moo.home@example.com
 EMAIL;TYPE=work;ALTID=1;PID=2;PREF=3;BUSINESS=Money:moo.business@example.com
-IMPP;ALTID=10;PID=20;MEDIATYPE=text/plain;PREF=40;WONDERFUL=Colour:moo@examp
- le.com
+IMPP;ALTID=10;PID=20;MEDIATYPE=text/plain;PREF=40;WONDERFUL=Colour:skype:moo
@example.com
 IMPP;TYPE=home;ALTID=20;PID=40;PREF=80;MEDIATYPE=text/reallyplain;PEACE=quie
- t:moo.home@example.com
+ t:msn:moo.home@example.com
 IMPP;TYPE=work;ALTID=98;PID=99;PREF=50;MEDIATYPE=text/superplain;BUSINESS=Mo
- ney:moo.business@example.com
+ ney:xmpp:moo.business@example.com
 TEL;ALTID=10;PID=20;PREF=40;WONDERFUL=Colour;TYPE="fax,cell":tel:00000000
 TEL;TYPE="home,fax";ALTID=10;PID=20;PREF=40;BUSINESS=Money:tel:00001111
 TEL;TYPE="work,voice";ALTID=25;PID=50;PREF=75;BEEP=Boop:tel:22221111
index bc3f62f..3d12c8d 100644 (file)
@@ -1237,13 +1237,19 @@ TEST(ContactLoad, TelephoneTests){
        
        TestFileIter = TestFile.GeneralTelephoneList.find(0);
        ASSERT_NE(TestFile.GeneralTelephoneList.end(), TestFileIter);
-       ASSERT_EQ("tel:00000000", TestFileIter->second);
+       ASSERT_EQ("00000000", TestFileIter->second);
+       
+       // Check the data type section.
+
+       TestFileIter = TestFile.GeneralTelephoneListDataType.find(0);
+       ASSERT_NE(TestFile.GeneralTelephoneListDataType.end(), TestFileIter);
+       ASSERT_EQ("tel", TestFileIter->second); 
        
        // Check the type section.
        
        TestFileIter = TestFile.GeneralTelephoneListTypeInfo.find(0);
        ASSERT_NE(TestFile.GeneralTelephoneListTypeInfo.end(), TestFileIter);
-       ASSERT_EQ("fax,mobile", TestFileIter->second);  
+       ASSERT_EQ("fax,cell", TestFileIter->second.ToStdString());      
        
        // Check the ALTID section.
        
@@ -1273,7 +1279,13 @@ TEST(ContactLoad, TelephoneTests){
        
        TestFileIter = TestFile.HomeTelephoneList.find(1);
        ASSERT_NE(TestFile.HomeTelephoneList.end(), TestFileIter);
-       ASSERT_EQ("tel:00001111", TestFileIter->second);
+       ASSERT_EQ("00001111", TestFileIter->second);
+       
+       // Check the data type section.
+
+       TestFileIter = TestFile.HomeTelephoneListDataType.find(1);
+       ASSERT_NE(TestFile.HomeTelephoneListDataType.end(), TestFileIter);
+       ASSERT_EQ("tel", TestFileIter->second); 
        
        // Check the type section.
        
@@ -1309,7 +1321,13 @@ TEST(ContactLoad, TelephoneTests){
        
        TestFileIter = TestFile.BusinessTelephoneList.find(2);
        ASSERT_NE(TestFile.BusinessTelephoneList.end(), TestFileIter);
-       ASSERT_EQ("tel:22221111", TestFileIter->second);
+       ASSERT_EQ("22221111", TestFileIter->second);
+       
+       // Check the data type section.
+
+       TestFileIter = TestFile.BusinessTelephoneListDataType.find(2);
+       ASSERT_NE(TestFile.BusinessTelephoneListDataType.end(), TestFileIter);
+       ASSERT_EQ("tel", TestFileIter->second);
        
        // Check the type section.
        
@@ -4298,6 +4316,4 @@ TEST(ContactLoad, XTokenTest){
        ASSERT_NE(TestFile.XTokenListTokens.end(), TestFileIter);
        ASSERT_EQ("FOODS;STATUS=FAVOURITE;TYPE=CHEESEANDONION", TestFileIter->second.ToStdString());
 
-}
-
-// TODO: Add tests for the Contact Loading process.
\ No newline at end of file
+}
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy