X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_icaleventload.h;h=cc451ff18dded1a1f6afa7869e3b8cb0c558092a;hb=e0ba3fb175a235317e9e0aebbcd707616dca60dc;hp=d2c342ca1105d7f3d8fcc3b91407bec5e0a5e2d8;hpb=6b78f2e62262b742adb854fe9645ce8a7b6ff655;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icaleventload.h b/source/tests/xestiacalendar_icaleventload.h index d2c342c..cc451ff 100644 --- a/source/tests/xestiacalendar_icaleventload.h +++ b/source/tests/xestiacalendar_icaleventload.h @@ -145,9 +145,9 @@ TEST(iCalendarEvent, ObjectDataTests){ // Tests for STATUS. - ASSERT_EQ("2.0;Success", TestEvent.RequestStatusData); - ASSERT_EQ("kw", TestEvent.RequestStatusLanguage); - ASSERT_EQ("FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN", TestEvent.RequestStatusTokens); + ASSERT_EQ("2.0;Success", TestEvent.StatusData); + ASSERT_EQ("kw", TestEvent.StatusLanguage); + ASSERT_EQ("FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN", TestEvent.StatusTokens); // Tests for SUMMARY. @@ -596,4 +596,120 @@ TEST(iCalendarEvent, ObjectDataTests){ 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); + + // Get the first REQUEST-STATUS. + + std::string RequestStatus; + + if (TestEvent.RequestStatusData.begin() != TestEvent.RequestStatusData.end()){ + + RequestStatus = TestEvent.RequestStatusData[0]; + + } + + ASSERT_EQ("2.0;Success", RequestStatus); + + // Get the second REQUEST-STATUS. + + RequestStatus.clear(); + + std::string RequestLanguage; + + if (TestEvent.ContactList.size() > 1){ + + RequestStatus = TestEvent.RequestStatusData[1]; + + } + + if (TestEvent.ContactList.size() > 1){ + + RequestLanguage = TestEvent.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 (TestEvent.ContactList.size() > 2){ + + RequestStatus = TestEvent.RequestStatusData[2]; + + } + + if (TestEvent.ContactList.size() > 2){ + + RequestTokens = TestEvent.RequestStatusTokens[2]; + + } + + ASSERT_EQ("3.7;Invalid calendar user", RequestStatus); + ASSERT_EQ("USER=MISSING", RequestTokens); + } \ No newline at end of file