}
+ // Process the CLASS value.
+
+ if (ClassData.size() > 0){
+
+ if (ClassDataTokens.size() > 0){
+
+ DataLine += "CLASS;";
+ DataLine += ClassDataTokens;
+
+ } else {
+
+ DataLine += "CLASS";
+
+ }
+
+ DataLine += ":";
+ DataLine += ClassData;
+ DataLine += "\n";
+
+ DataLineProcessed = OutputText(&DataLine);
+
+ *SaveData += DataLineProcessed;
+
+ DataLine.clear();
+ DataLineProcessed.clear();
+
+ }
+
*SaveData += "END:VTODO\n";
}
\ No newline at end of file
TEST(iCalendarSaveTask, SaveTaskTests){
CalendarTaskObject TestTask;
+ CalendarTaskObject TestTask2;
// Load the test journal information.
TestTask.SaveString(&SaveData);
ASSERT_EQ(SaveDataComparison, SaveData);
+
+ ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTask2.LoadFile("iCalendarTask-Load2.vcf"));
+ ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTask2.ValidBaseObject());
+
+ // Second task file.
+
+ SaveDataComparison = "BEGIN:VCALENDAR\n"
+ "VERSION:2.0\n"
+ "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
+ "BEGIN:VTODO\n"
+ "UID;UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT:b3a16392-ad86-4061-be53-c215af2306e1\n"
+ "DTSTAMP;OTHER=PARAM:20160131T104500Z\n"
+ "CLASS;CHOCOLATE=NONE:PUBLIC\n"
+ "END:VTODO\n"
+ "END:VCALENDAR";
+
+ SaveData.clear();
+ TestTask2.SaveString(&SaveData);
+
+ ASSERT_EQ(SaveDataComparison, SaveData);
+
}
\ No newline at end of file