Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added TZID property for saving data from a CalendarTaskObject.
[xestiacalendar/.git] / source / tests / xestiacalendar_icaltimezonesave.h
index 1cfd595..0bc4a3b 100644 (file)
@@ -27,6 +27,24 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){
        ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone.LoadFile("iCalendarTimezone-Load1.vcf"));
        ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTimezone.ValidBaseObject());
        
+       ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, TestTimezone.SaveFile("/stupidfilelocation/dontsavehere.ics"));
        
+       // Save the data to a string and compare the data.
+
+       // First contact file.
+       
+       std::string SaveDataComparison = "BEGIN:VCALENDAR\n"
+       "VERSION:2.0\n"
+       "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
+       "BEGIN:VTIMEZONE\n"
+       "TZID:Example/Starrgazy\n"
+       "END:VTIMEZONE\n"
+       "END:VCALENDAR";
+       
+       std::string SaveData;
+       
+       TestTimezone.SaveString(&SaveData);
+       
+       ASSERT_EQ(SaveDataComparison, SaveData);
        
 }
\ 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