}
+ // Process the CLASS.
+
+ if (ClassData.size() > 0){
+
+ DataLine += "CLASS";
+
+ if (ClassDataTokens.size() > 0){
+
+ DataLine += ";";
+ DataLine += ClassDataTokens;
+
+ }
+
+ DataLine += ":";
+ DataLine += ClassData;
+ DataLine += "\n";
+
+ DataLineProcessed = OutputText(&DataLine);
+
+ *SaveData += DataLineProcessed;
+
+ DataLine.clear();
+ DataLineProcessed.clear();
+
+ }
+
*SaveData += "END:VJOURNAL\n";
}
\ No newline at end of file
TEST(iCalendarSaveJournal, SaveEventTests){
CalendarJournalObject TestJournal;
+ CalendarJournalObject TestJournal2;
// Load the test journal information.
ASSERT_EQ(SaveDataComparison, SaveData);
+ SaveData.clear();
+
+ ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestJournal2.LoadFile("iCalendarJournal-Load2.vcf"));
+ ASSERT_EQ(CALENDAROBJECTVALID_OK, TestJournal2.ValidBaseObject());
+
+ TestJournal2.SaveString(&SaveData);
+
+ SaveDataComparison = "BEGIN:VCALENDAR\n"
+ "VERSION:2.0\n"
+ "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
+ "BEGIN:VJOURNAL\n"
+ "UID;UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT:b3a16392-ad86-4061-be53-c215af2306c1\n"
+ "DTSTAMP;OTHER=PARAM:20160131T141500Z\n"
+ "SUMMARY;ALTREP=\"null:nodata\";LANGUAGE=kw;FAVOURITE=TOFU;NOTLIKE=NONE:A summar\n"
+ " y of the journal entry.\n"
+ "CLASS;CHOCOLATE=BAR:PUBLIC\n"
+ "END:VJOURNAL\n"
+ "END:VCALENDAR";
+
+ ASSERT_EQ(SaveDataComparison, SaveData);
+
}
\ No newline at end of file