ASSERT_EQ("BINARY", AttachDataValue);
ASSERT_EQ("STUPID=EXAMPLE", AttachDataTokens);
+ // Tests for ATTENDEE. First ATTENDEE property.
+
+ std::string AttendeeDataMember;
+ std::string AttendeeDataDelegatedFrom;
+ std::string AttendeeDataDelegatedTo;
+ std::string AttendeeDataRole;
+ std::string AttendeeDataRSVP;
+ std::string AttendeeDataDirectoryEntry;
+ std::string AttendeeDataSentBy;
+ std::string AttendeeDataCommonName;
+ std::string AttendeeDataCalendarUserType;
+ std::string AttendeeDataParticipationStatus;
+ std::string AttendeeDataLanguage;
+ std::string AttendeeDataTokens;
+ std::string AttendeeData;
+
+ if (TestEvent.AttendeeList.begin() != TestEvent.AttendeeList.end()){
+
+ AttendeeData = TestEvent.AttendeeList[0];
+
+ }
+
+ ASSERT_EQ("Attendee One", AttendeeData);
+
+ // Second ATTENDEE property.
+
+ AttendeeData.clear();
+
+ if (TestEvent.AttendeeList.size() > 1){
+
+ AttendeeData = TestEvent.AttendeeList[1];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 1){
+
+ AttendeeDataDelegatedFrom = TestEvent.AttendeeListDelegatedFrom[1];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 1){
+
+ AttendeeDataDelegatedTo = TestEvent.AttendeeListDelegatedTo[1];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 1){
+
+ AttendeeDataRole = TestEvent.AttendeeListRole[1];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 1){
+
+ AttendeeDataRSVP = TestEvent.AttendeeListRSVP[1];
+
+ }
+
+ ASSERT_EQ("Attendee Two", AttendeeData);
+ ASSERT_EQ("mailto:delegated.from@example.com", AttendeeDataDelegatedFrom);
+ ASSERT_EQ("mailto:delegated.to@example.com", AttendeeDataDelegatedTo);
+ ASSERT_EQ("CHAIR", AttendeeDataRole);
+ ASSERT_EQ("TRUE", AttendeeDataRSVP);
+
+ // Third ATTENDEE property.
+
+ AttendeeData.clear();
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeData = TestEvent.AttendeeList[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataDirectoryEntry = TestEvent.AttendeeListDirectoryEntry[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataSentBy = TestEvent.AttendeeListSentBy[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataCommonName = TestEvent.AttendeeListCommonName[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataCalendarUserType = TestEvent.AttendeeListCalendarUserType[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataParticipationStatus = TestEvent.AttendeeListParticipationStatus[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataLanguage = TestEvent.AttendeeListLanguage[2];
+
+ }
+
+ if (TestEvent.AttendeeList.size() > 2){
+
+ AttendeeDataTokens = TestEvent.AttendeeListTokens[2];
+
+ }
+
+ ASSERT_EQ("Attendee Three", AttendeeData);
+ ASSERT_EQ("null:nodata", AttendeeDataDirectoryEntry);
+ ASSERT_EQ("mailto:sent.by@example.com", AttendeeDataSentBy);
+ ASSERT_EQ("Attendee The Third", AttendeeDataCommonName);
+ ASSERT_EQ("INDIVIDUAL", AttendeeDataCalendarUserType);
+ ASSERT_EQ("ACCEPTED", AttendeeDataParticipationStatus);
+ ASSERT_EQ("kw", AttendeeDataLanguage);
+ ASSERT_EQ("EXAMPLE=DATA", AttendeeDataTokens);
+
+ // Get the first CATEGORIES.
+
+ std::string CategoryData;
+
+ if (TestEvent.CategoriesList.begin() != TestEvent.CategoriesList.end()){
+
+ CategoryData = TestEvent.CategoriesList[0];
+
+ }
+
+ ASSERT_EQ("CATEGORY ONE, CATEGORY TWO", CategoryData);
+
+ CategoryData.clear();
+
+ std::string CategoryLanguage;
+
+ // Get the second CATEGORIES.
+
+ if (TestEvent.CategoriesList.size() > 1){
+
+ CategoryData = TestEvent.CategoriesList[1];
+
+ }
+
+ if (TestEvent.CategoriesList.size() > 1){
+
+ CategoryLanguage = TestEvent.CategoriesListLanguage[1];
+
+ }
+
+ ASSERT_EQ("CATEGORY THREE, CATEGORY FOUR", CategoryData);
+ ASSERT_EQ("en", CategoryLanguage);
+
+ CategoryData.clear();
+ CategoryLanguage.clear();
+
+ // Get the third CATEGORIES.
+
+ std::string CategoryTokens;
+
+ if (TestEvent.CategoriesList.size() > 2){
+
+ CategoryData = TestEvent.CategoriesList[2];
+
+ }
+
+ if (TestEvent.CategoriesList.size() > 2){
+
+ CategoryLanguage = TestEvent.CategoriesListLanguage[2];
+
+ }
+
+ if (TestEvent.CategoriesList.size() > 2){
+
+ CategoryTokens = TestEvent.CategoriesListTokens[2];
+
+ }
+
+ ASSERT_EQ("CATEGORY FIVE, CATEGORY SIX, CATEGORY SEVEN", CategoryData);
+ ASSERT_EQ("en-GB", CategoryLanguage);
+ ASSERT_EQ("SAMPLE=TOKEN", CategoryTokens);
+
+ // Get the first COMMENT.
+
+ std::string CommentData;
+
+ if (TestEvent.CommentList.begin() != TestEvent.CommentList.end()){
+
+ CommentData = TestEvent.CommentList[0];
+
+ }
+
+ ASSERT_EQ("This is the first comment.", CommentData);
+
+ // Get the second COMMENT.
+
+ CommentData.clear();
+
+ std::string CommentDataAltRep;
+ std::string CommentDataLanguage;
+
+ if (TestEvent.CommentList.size() > 1){
+
+ CommentData = TestEvent.CommentList[1];
+
+ }
+
+ if (TestEvent.CommentList.size() > 1){
+
+ CommentDataAltRep = TestEvent.CommentListAltRep[1];
+
+ }
+
+ if (TestEvent.CommentList.size() > 1){
+
+ CommentDataLanguage = TestEvent.CommentListLanguage[1];
+
+ }
+
+ ASSERT_EQ("This is the second comment.", CommentData);
+ ASSERT_EQ("null:nodata", CommentDataAltRep);
+ ASSERT_EQ("en", CommentDataLanguage);
+
+ // Get the third COMMENT.
+
+ CommentData.clear();
+
+ std::string CommentDataTokens;
+
+ if (TestEvent.CommentList.size() > 2){
+
+ CommentData = TestEvent.CommentList[2];
+
+ }
+
+ if (TestEvent.CommentList.size() > 2){
+
+ CommentDataTokens = TestEvent.CommentListTokens[2];
+
+ }
+
+ ASSERT_EQ("This is the third comment.", CommentData);
+ ASSERT_EQ("ZEBRAS=YES", CommentDataTokens);
+
+ // Get the first CONTACT.
+
+ std::string ContactData;
+
+ if (TestEvent.ContactList.begin() != TestEvent.ContactList.end()){
+
+ ContactData = TestEvent.ContactList[0];
+
+ }
+
+ ASSERT_EQ("First Contact", ContactData);
+
+ // Get the second CONTACT.
+
+ ContactData.clear();
+
+ std::string ContactDataAltRep;
+ std::string ContactDataLanguage;
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ContactData = TestEvent.ContactList[1];
+
+ }
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ContactDataAltRep = TestEvent.ContactListAltRep[1];
+
+ }
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ContactDataLanguage = TestEvent.ContactListLanguage[1];
+
+ }
+
+ ASSERT_EQ("Second Contact", ContactData);
+ ASSERT_EQ("null:nodata", ContactDataAltRep);
+ ASSERT_EQ("en-GB", ContactDataLanguage);
+
+ // Get the third CONTACT.
+
+ ContactData.clear();
+
+ std::string ContactDataTokens;
+
+ if (TestEvent.ContactList.size() > 2){
+
+ ContactData = TestEvent.ContactList[2];
+
+ }
+
+ if (TestEvent.ContactList.size() > 2){
+
+ ContactDataTokens = TestEvent.ContactListTokens[2];
+
+ }
+
+ ASSERT_EQ("Third Contact", ContactData);
+ ASSERT_EQ("ZEBRAS=NO", ContactDataTokens);
+
+ // Get the first EXDATE.
+
+ std::string ExcludeDate;
+
+ if (TestEvent.ExcludeDateData.begin() != TestEvent.ExcludeDateData.end()){
+
+ ExcludeDate = TestEvent.ExcludeDateData[0];
+
+ }
+
+ ASSERT_EQ("20160125T120000Z", ExcludeDate);
+
+ // Get the second EXDATE.
+
+ ExcludeDate.clear();
+
+ std::string ExcludeDataTimeZoneParam;
+ std::string ExcludeDataValue;
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ExcludeDate = TestEvent.ExcludeDateData[1];
+
+ }
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ExcludeDataTimeZoneParam = TestEvent.ExcludeDateDataTimeZoneParam[1];
+
+ }
+
+ if (TestEvent.ContactList.size() > 1){
+
+ ExcludeDataValue = TestEvent.ExcludeDateDataValue[1];
+
+ }
+
+ ASSERT_EQ("20160125T130000Z", ExcludeDate);
+ ASSERT_EQ("DATE-TIME", ExcludeDataValue);
+ ASSERT_EQ("Europe/Truro", ExcludeDataTimeZoneParam);
+
+ // Get the third EXDATE.
+
+ ExcludeDate.clear();
+
+ std::string ExcludeDataTokens;
+
+ if (TestEvent.ContactList.size() > 2){
+
+ ExcludeDate = TestEvent.ExcludeDateData[2];
+
+ }
+
+ if (TestEvent.ContactList.size() > 2){
+
+ ExcludeDataTokens = TestEvent.ExcludeDateDataTokens[2];
+
+ }
+
+ ASSERT_EQ("20160125T133000Z", ExcludeDate);
+ ASSERT_EQ("ZOOP=ZIPPO", ExcludeDataTokens);
+
}
\ No newline at end of file