X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_icaltaskload.h;h=4af7939becdf1087bd75e6599ac48bb464f5f430;hb=3ae765e28106ab8e39237413fa97c8a094534694;hp=6940e4ce21f8f322cd3fc622bdb6d4a11281af62;hpb=68de45141c3dab181fe0a05555015be065a10f05;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icaltaskload.h b/source/tests/xestiacalendar_icaltaskload.h index 6940e4c..4af7939 100644 --- a/source/tests/xestiacalendar_icaltaskload.h +++ b/source/tests/xestiacalendar_icaltaskload.h @@ -581,5 +581,175 @@ TEST(iCalendarTask, ObjectDataTests){ ASSERT_EQ("Third Contact", ContactData); ASSERT_EQ("ZEBRAS=NO", ContactDataTokens); + + // Get the first EXDATE. + + std::string ExcludeDate; + + if (TestTask.ExcludeDateData.begin() != TestTask.ExcludeDateData.end()){ + + ExcludeDate = TestTask.ExcludeDateData[0]; + + } + + ASSERT_EQ("20160125T120000Z", ExcludeDate); + + // Get the second EXDATE. + + ExcludeDate.clear(); + + std::string ExcludeDataTimeZoneParam; + std::string ExcludeDataValue; + + if (TestTask.ContactList.size() > 1){ + + ExcludeDate = TestTask.ExcludeDateData[1]; + + } + + if (TestTask.ContactList.size() > 1){ + + ExcludeDataTimeZoneParam = TestTask.ExcludeDateDataTimeZoneParam[1]; + + } + + if (TestTask.ContactList.size() > 1){ + + ExcludeDataValue = TestTask.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 (TestTask.ContactList.size() > 2){ + + ExcludeDate = TestTask.ExcludeDateData[2]; + + } + + if (TestTask.ContactList.size() > 2){ + + ExcludeDataTokens = TestTask.ExcludeDateDataTokens[2]; + + } + + ASSERT_EQ("20160125T133000Z", ExcludeDate); + ASSERT_EQ("ZOOP=ZIPPO", ExcludeDataTokens); + + // Get the first REQUEST-STATUS. + + std::string RequestStatus; + + if (TestTask.RequestStatusData.begin() != TestTask.RequestStatusData.end()){ + + RequestStatus = TestTask.RequestStatusData[0]; + + } + + ASSERT_EQ("2.0;Success", RequestStatus); + + // Get the second REQUEST-STATUS. + + RequestStatus.clear(); + + std::string RequestLanguage; + + if (TestTask.ContactList.size() > 1){ + + RequestStatus = TestTask.RequestStatusData[1]; + + } + + if (TestTask.ContactList.size() > 1){ + + RequestLanguage = TestTask.RequestStatusLanguage[1]; + + } + + ASSERT_EQ("3.42;Really big irrecoverable error caused by the user", RequestStatus); + ASSERT_EQ("en", RequestLanguage); + + // Get the third REQUEST-STATUS. + + RequestStatus.clear(); + + std::string RequestTokens; + + if (TestTask.ContactList.size() > 2){ + + RequestStatus = TestTask.RequestStatusData[2]; + + } + + if (TestTask.ContactList.size() > 2){ + + RequestTokens = TestTask.RequestStatusTokens[2]; + + } + + ASSERT_EQ("3.7;Invalid calendar user", RequestStatus); + ASSERT_EQ("USER=MISSING", RequestTokens); + + // Get the first RELATED-TO. + + std::string RelatedTo; + + if (TestTask.RelatedToData.begin() != TestTask.RelatedToData.end()){ + + RelatedTo = TestTask.RelatedToData[0]; + + } + + ASSERT_EQ("person.1@example.com", RelatedTo); + + // Get the second RELATED-TO. + + RelatedTo.clear(); + + std::string RelatedToType; + + if (TestTask.RelatedToData.size() > 1){ + + RelatedTo = TestTask.RelatedToData[1]; + + } + + if (TestTask.RelatedToData.size() > 1){ + + RelatedToType = TestTask.RelatedToDataRelationType[1]; + + } + + ASSERT_EQ("person.2@example.com", RelatedTo); + ASSERT_EQ("PARENT", RelatedToType); + + // Get the third RELATED-TO. + + RelatedTo.clear(); + + std::string RelatedToTokens; + + if (TestTask.RelatedToData.size() > 2){ + + RelatedTo = TestTask.RelatedToData[2]; + + } + + if (TestTask.RelatedToData.size() > 2){ + + RelatedToTokens = TestTask.RelatedToDataTokens[2]; + + } + + ASSERT_EQ("person.3@example.com", RelatedTo); + ASSERT_EQ("SCHOOL=MEETING", RelatedToTokens); } \ No newline at end of file