Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added tests for checking the PHOTO and LOGO TYPEs.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 31 Dec 2015 22:08:11 +0000 (22:08 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 31 Dec 2015 22:08:11 +0000 (22:08 +0000)
source/tests/LoadCheck-Load4.vcf
source/tests/xestiaab_contactload.h

index 31462b0..1b0b0d7 100644 (file)
@@ -108,21 +108,21 @@ CATEGORIES;TYPE=work;ALTID=84;PID=86;LANGUAGE=kw;PREF=88;AAA=BBB:Category Fo
 PHOTO;ALTID=70;PID=71;MEDIATYPE=image/png;PREF=72;MEEP=MOO:data:image/png;ba
  se64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAJUlEQVQoz2NkwAb+//8PYT
  AyMmLKMjGQDuilhxHudBrbM8zCDQCxHQkPeaUvawAAAABJRU5ErkJggg==
-PHOTO;ALTID=20;PID=21;MEDIATYPE=image/png;PREF=22;BEEP=BOOP:data:image/png;b
- ase64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2NkYPjPgAr+o
- wkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC
-PHOTO;ALTID=90;PID=91;MEDIATYPE=image/png;PREF=92;PHOTO=YUP:data:image/png;b
- ase64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm53EgApep
- sxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=
+PHOTO;TYPE=home;ALTID=20;PID=21;MEDIATYPE=image/png;PREF=22;BEEP=BOOP:data:i
+ mage/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2N
kYPjPgAr+owkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC
+PHOTO;TYPE=work;ALTID=90;PID=91;MEDIATYPE=image/png;PREF=92;PHOTO=YUP:data:i
+ mage/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2M
Um53EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=
 LOGO;ALTID=70;PID=71;MEDIATYPE=image/png;PREF=72;MEEP=MOO:data:image/png;bas
  e64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAJUlEQVQoz2NkwAb+//8PYTA
  yMmLKMjGQDuilhxHudBrbM8zCDQCxHQkPeaUvawAAAABJRU5ErkJggg==
-LOGO;ALTID=20;PID=21;MEDIATYPE=image/png;PREF=22;BEEP=BOOP:data:image/png;ba
- se64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2NkYPjPgAr+ow
- kwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC
-LOGO;ALTID=90;PID=91;MEDIATYPE=image/png;PREF=92;LOGO=YUP:data:image/png;bas
- e64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm53EgApepsx
- F4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=
+LOGO;TYPE=home;ALTID=20;PID=21;MEDIATYPE=image/png;PREF=22;BEEP=BOOP:data:im
+ age/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2Nk
YPjPgAr+owkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC
+LOGO;TYPE=work;ALTID=90;PID=91;MEDIATYPE=image/png;PREF=92;LOGO=YUP:data:ima
+ ge/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm
53EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=
 SOUND;ALTID=4;PID=1;MEDIATYPE=application/ogg;LANGUAGE=kw;PREF=2;MEEP=MOO:da
  ta:application/ogg;base64,T2dnUwACAAAAAAAAAAAqlr5kAAAAAPjSH5UBHgF2b3JiaXMAA
  AAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAAKpa+ZAEAAAAJVIuhDzz/////////
index 3c72c72..bc3f62f 100644 (file)
@@ -17,7 +17,7 @@
 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
 
 #include <gtest/gtest.h>
-#include "../contacteditor/ContactDataObject.h"
+#include "../contacteditor/cdo/ContactDataObject.h"
 
 TEST(ContactLoad, ContactLoadTests){
 
@@ -2578,6 +2578,11 @@ TEST(ContactLoad, PhotoTests){
        ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
        ASSERT_EQ("71", TestFileIter->second);
        
+       // Check the TYPE section.
+       
+       TestFileIter = TestFile.PicturesListType.find(0);
+       ASSERT_EQ(TestFile.PicturesListType.end(), TestFileIter);
+       
        // Check the MEDIATYPE section.
        
        TestFileIter = TestFile.PicturesListMediatype.find(0);
@@ -2627,6 +2632,12 @@ TEST(ContactLoad, PhotoTests){
        ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
        ASSERT_EQ("21", TestFileIter->second);
        
+       // Check the TYPE section.
+       
+       TestFileIter = TestFile.PicturesListType.find(1);
+       ASSERT_NE(TestFile.PicturesListType.end(), TestFileIter);
+       ASSERT_EQ("home", TestFileIter->second);
+       
        // Check the MEDIATYPE section.
        
        TestFileIter = TestFile.PicturesListMediatype.find(1);
@@ -2676,6 +2687,12 @@ TEST(ContactLoad, PhotoTests){
        ASSERT_NE(TestFile.PicturesListPID.end(), TestFileIter);
        ASSERT_EQ("91", TestFileIter->second);
        
+       // Check the TYPE section.
+       
+       TestFileIter = TestFile.PicturesListType.find(2);
+       ASSERT_NE(TestFile.PicturesListType.end(), TestFileIter);
+       ASSERT_EQ("work", TestFileIter->second);
+       
        // Check the MEDIATYPE section.
        
        TestFileIter = TestFile.PicturesListMediatype.find(2);
@@ -2739,6 +2756,8 @@ TEST(ContactLoad, LogoTests){
        ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
        ASSERT_EQ("71", TestFileIter->second);
        
+       // Check the TYPE section.
+               
        // Check the MEDIATYPE section.
        
        TestFileIter = TestFile.LogosListMediatype.find(0);
@@ -2787,6 +2806,12 @@ TEST(ContactLoad, LogoTests){
        TestFileIter = TestFile.LogosListPID.find(1);
        ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
        ASSERT_EQ("21", TestFileIter->second);
+
+       // Check the TYPE section.
+       
+       TestFileIter = TestFile.LogosListType.find(1);
+       ASSERT_NE(TestFile.LogosListType.end(), TestFileIter);
+       ASSERT_EQ("home", TestFileIter->second);
        
        // Check the MEDIATYPE section.
        
@@ -2837,6 +2862,12 @@ TEST(ContactLoad, LogoTests){
        ASSERT_NE(TestFile.LogosListPID.end(), TestFileIter);
        ASSERT_EQ("91", TestFileIter->second);
        
+       // Check the TYPE section.
+       
+       TestFileIter = TestFile.LogosListType.find(2);
+       ASSERT_NE(TestFile.LogosListType.end(), TestFileIter);
+       ASSERT_EQ("work", TestFileIter->second);
+       
        // Check the MEDIATYPE section.
        
        TestFileIter = TestFile.LogosListMediatype.find(2);
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