X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_icaleventload.h;h=89e33d5e7b2465e46d8e30ac8f2e4b6b5e79a90b;hb=fdde55ede1ea228da599f831ba19afbcf5ad56ea;hp=cc451ff18dded1a1f6afa7869e3b8cb0c558092a;hpb=e0ba3fb175a235317e9e0aebbcd707616dca60dc;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icaleventload.h b/source/tests/xestiacalendar_icaleventload.h index cc451ff..89e33d5 100644 --- a/source/tests/xestiacalendar_icaleventload.h +++ b/source/tests/xestiacalendar_icaleventload.h @@ -712,4 +712,58 @@ TEST(iCalendarEvent, ObjectDataTests){ ASSERT_EQ("3.7;Invalid calendar user", RequestStatus); ASSERT_EQ("USER=MISSING", RequestTokens); + // Get the first RELATED-TO. + + std::string RelatedTo; + + if (TestEvent.RelatedToData.begin() != TestEvent.RelatedToData.end()){ + + RelatedTo = TestEvent.RelatedToData[0]; + + } + + ASSERT_EQ("person.1@example.com", RelatedTo); + + // Get the second RELATED-TO. + + RelatedTo.clear(); + + std::string RelatedToType; + + if (TestEvent.RelatedToData.size() > 1){ + + RelatedTo = TestEvent.RelatedToData[1]; + + } + + if (TestEvent.RelatedToData.size() > 1){ + + RelatedToType = TestEvent.RelatedToDataRelationType[1]; + + } + + ASSERT_EQ("person.2@example.com", RelatedTo); + ASSERT_EQ("PARENT", RelatedToType); + + // Get the third RELATED-TO. + + RelatedTo.clear(); + + std::string RelatedToTokens; + + if (TestEvent.RelatedToData.size() > 2){ + + RelatedTo = TestEvent.RelatedToData[2]; + + } + + if (TestEvent.RelatedToData.size() > 2){ + + RelatedToTokens = TestEvent.RelatedToDataTokens[2]; + + } + + ASSERT_EQ("person.3@example.com", RelatedTo); + ASSERT_EQ("SCHOOL=MEETING", RelatedToTokens); + } \ No newline at end of file