// xestiacalendar_icaltimezoneload.h - Xestia Calendar iCalendar Timezone Component Unit Tests
//
// (c) 2016-2017 Xestia Software Development.
//
// This file is part of Xestia Calendar.
//
// Xestia Calendar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by the
// Free Software Foundation, version 3 of the license.
//
// Xestia Calendar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with Xestia Calendar. If not, see
#include "CalendarTimezone.h"
#include
class iCalendarTimezoneLoadTests : public ::testing::Test
{
private:
virtual void SetUp()
{
}
virtual void TearDown()
{
}
};
TEST_F(iCalendarTimezoneLoadTests, DISABLED_BasicTests){
CalendarTimezoneObject testTimezone;
ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, testTimezone.LoadFile("iCalendarTimezone-Missing.vcf"));
ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, testTimezone.LoadFile("iCalendarTimezone-InvalidPermissions.vcf"));
ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone.LoadFile("iCalendarTimezone-Load1.vcf"));
}
TEST_F(iCalendarTimezoneLoadTests, ObjectDataTests){
CalendarTimezoneObject testTimezone;
ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone.LoadFile("iCalendarTimezone-Load2.vcf"));
ASSERT_EQ(CALENDAROBJECTVALID_OK, testTimezone.ValidBaseObject());
// Tests for UID.
ASSERT_EQ("Example/Starrgazy", testTimezone.timeZoneData);
ASSERT_EQ("OTHER=PARAM", testTimezone.timeZoneDataTokens);
// Tests for LAST-MODIFIED.
ASSERT_EQ("20160203T200700Z", testTimezone.lastModifiedData);
ASSERT_EQ("FUTURE=ODD", testTimezone.lastModifiedTokens);
// Tests for TZURL.
ASSERT_EQ("http://www.example.com/", testTimezone.timeZoneURLData);
ASSERT_EQ("URL=YES", testTimezone.timeZoneURLTokens);
// Tests for the first STANDARD data.
std::string dateTimeStartData;
std::string timeZoneOffsetToData;
std::string timeZoneOffsetFromData;
if (testTimezone.timezoneStandardCollection.size() > 0){
dateTimeStartData = testTimezone.timezoneStandardCollection[0].dateTimeStartData;
}
if (testTimezone.timezoneStandardCollection.size() > 0){
timeZoneOffsetToData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetToData;
}
if (testTimezone.timezoneStandardCollection.size() > 0){
timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetFromData;
}
ASSERT_EQ("20160204T020000", dateTimeStartData);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
// Tests for the second STANDARD data.
std::string dateTimeStartTokens;
std::string timeZoneOffsetToTokens;
std::string timeZoneOffsetFromTokens;
std::string recurranceRuleData;
std::string recurranceRuleDataTokens;
std::string commentList;
std::string commentListAltRep;
std::string commentListLanguage;
std::string commentListTokens;
std::string recurranceDateData;
std::string recurranceDateValue;
std::string recurranceDateDataTimeZoneParam;
std::string recurranceDateDataTokens;
std::string timeZoneNameData;
std::string timeZoneNameLanguage;
std::string timeZoneNameTokens;
std::string xTokensData;
std::string xTokensDataTokens;
dateTimeStartData.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
if (testTimezone.timezoneStandardCollection.size() > 1){
dateTimeStartData = testTimezone.timezoneStandardCollection[1].dateTimeStartData;
dateTimeStartTokens = testTimezone.timezoneStandardCollection[1].dateTimeStartTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 1){
timeZoneOffsetToData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToData;
timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 1){
timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromData;
timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromTokens;
}
ASSERT_EQ("20160205T020000", dateTimeStartData);
ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
// Tests for third STANDARD data.
dateTimeStartData.clear();
dateTimeStartTokens.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetToTokens.clear();
timeZoneOffsetFromData.clear();
timeZoneOffsetFromTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2){
dateTimeStartData = testTimezone.timezoneStandardCollection[2].dateTimeStartData;
dateTimeStartTokens = testTimezone.timezoneStandardCollection[2].dateTimeStartTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 2){
timeZoneOffsetToData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToData;
timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 2){
timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromData;
timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].commentList.size() > 0){
commentList = testTimezone.timezoneStandardCollection[2].commentList[0];
commentListAltRep = testTimezone.timezoneStandardCollection[2].commentListAltRep[0];
commentListLanguage = testTimezone.timezoneStandardCollection[2].commentListLanguage[0];
commentListTokens = testTimezone.timezoneStandardCollection[2].commentListTokens[0];
}
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].recurranceRuleData.size() > 0){
recurranceRuleData = testTimezone.timezoneStandardCollection[2].recurranceRuleData;
recurranceRuleDataTokens = testTimezone.timezoneStandardCollection[2].recurranceRuleDataTokens;
}
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].recurranceDateData.size() > 0){
recurranceDateData = testTimezone.timezoneStandardCollection[2].recurranceDateData[0];
recurranceDateValue = testTimezone.timezoneStandardCollection[2].recurranceDateDataValue[0];
recurranceDateDataTimeZoneParam = testTimezone.timezoneStandardCollection[2].recurranceDateDataTimeZoneParam[0];
recurranceDateDataTokens = testTimezone.timezoneStandardCollection[2].recurranceDateDataTokens[0];
}
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].timeZoneNameData.size() > 0){
timeZoneNameData = testTimezone.timezoneStandardCollection[2].timeZoneNameData[0];
timeZoneNameLanguage = testTimezone.timezoneStandardCollection[2].timeZoneNameLanguage[0];
timeZoneNameTokens = testTimezone.timezoneStandardCollection[2].timeZoneNameTokens[0];
}
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 0){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[0];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[0];
}
ASSERT_EQ("20160206T020000", dateTimeStartData);
ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
ASSERT_EQ("Example timezone comment.", commentList);
ASSERT_EQ("null:nodata", commentListAltRep);
ASSERT_EQ("kw", commentListLanguage);
ASSERT_EQ("YO=YOYOS", commentListTokens);
ASSERT_EQ("FREQ=DAILY;COUNT=10", recurranceRuleData);
ASSERT_EQ("YAK=YES", recurranceRuleDataTokens);
ASSERT_EQ("20160205,20160207,20160216,20160305", recurranceDateData);
ASSERT_EQ("DATE", recurranceDateValue);
ASSERT_EQ("Europe/Truro", recurranceDateDataTimeZoneParam);
ASSERT_EQ("BEEP=BOOP", recurranceDateDataTokens);
ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
ASSERT_EQ("en", timeZoneNameLanguage);
ASSERT_EQ("NOPE=YES", timeZoneNameTokens);
ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
ASSERT_EQ("en", timeZoneNameLanguage);
ASSERT_EQ("Meep", xTokensData);
ASSERT_EQ("X-MOO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 1){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[1];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[1];
}
ASSERT_EQ("Moop", xTokensData);
ASSERT_EQ("X-MOO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 2){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[2];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[2];
}
ASSERT_EQ("Zaap", xTokensData);
ASSERT_EQ("X-MOO;MEEP=YIKES", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 3){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[3];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[3];
}
ASSERT_EQ("Fork", xTokensData);
ASSERT_EQ("X-ITEM", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 4){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[4];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[4];
}
ASSERT_EQ("Spoon", xTokensData);
ASSERT_EQ("X-ITEM", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 5){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[5];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[5];
}
ASSERT_EQ("Knife", xTokensData);
ASSERT_EQ("X-ITEM;DIRTY=NO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 6){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[6];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[6];
}
ASSERT_EQ("1", xTokensData);
ASSERT_EQ("X-NOPE", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 7){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[7];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[7];
}
ASSERT_EQ("2", xTokensData);
ASSERT_EQ("X-NOPE", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneStandardCollection.size() > 2 &&
testTimezone.timezoneStandardCollection[2].xTokensData.size() > 8){
xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[8];
xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[8];
}
ASSERT_EQ("3", xTokensData);
ASSERT_EQ("X-NOPE;LONG=YES", xTokensDataTokens);
// Tests for the first DAYLIGHT data.
dateTimeStartData.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
if (testTimezone.timezoneDaylightCollection.size() > 0){
dateTimeStartData = testTimezone.timezoneDaylightCollection[0].dateTimeStartData;
}
if (testTimezone.timezoneDaylightCollection.size() > 0){
timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetToData;
}
if (testTimezone.timezoneDaylightCollection.size() > 0){
timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetFromData;
}
ASSERT_EQ("20160204T020000", dateTimeStartData);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
// Tests for the second DAYLIGHT data.
dateTimeStartTokens.clear();
timeZoneOffsetToTokens.clear();
timeZoneOffsetFromTokens.clear();
recurranceRuleData.clear();
recurranceRuleDataTokens.clear();
commentList.clear();
commentListAltRep.clear();
commentListLanguage.clear();
commentListTokens.clear();
recurranceDateData.clear();
recurranceDateValue.clear();
recurranceDateDataTimeZoneParam.clear();
recurranceDateDataTokens.clear();
timeZoneNameData.clear();
timeZoneNameLanguage.clear();
timeZoneNameTokens.clear();
xTokensData.clear();
xTokensDataTokens.clear();
dateTimeStartData.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
if (testTimezone.timezoneDaylightCollection.size() > 1){
dateTimeStartData = testTimezone.timezoneDaylightCollection[1].dateTimeStartData;
dateTimeStartTokens = testTimezone.timezoneDaylightCollection[1].dateTimeStartTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 1){
timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToData;
timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 1){
timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromData;
timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromTokens;
}
ASSERT_EQ("20160205T020000", dateTimeStartData);
ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
// Tests for third DAYLIGHT data.
dateTimeStartData.clear();
dateTimeStartTokens.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetToTokens.clear();
timeZoneOffsetFromData.clear();
timeZoneOffsetFromTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2){
dateTimeStartData = testTimezone.timezoneDaylightCollection[2].dateTimeStartData;
dateTimeStartTokens = testTimezone.timezoneDaylightCollection[2].dateTimeStartTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 2){
timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToData;
timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 2){
timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromData;
timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].commentList.size() > 0){
commentList = testTimezone.timezoneDaylightCollection[2].commentList[0];
commentListAltRep = testTimezone.timezoneDaylightCollection[2].commentListAltRep[0];
commentListLanguage = testTimezone.timezoneDaylightCollection[2].commentListLanguage[0];
commentListTokens = testTimezone.timezoneDaylightCollection[2].commentListTokens[0];
}
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].recurranceRuleData.size() > 0){
recurranceRuleData = testTimezone.timezoneDaylightCollection[2].recurranceRuleData;
recurranceRuleDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceRuleDataTokens;
}
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].recurranceDateData.size() > 0){
recurranceDateData = testTimezone.timezoneDaylightCollection[2].recurranceDateData[0];
recurranceDateValue = testTimezone.timezoneDaylightCollection[2].recurranceDateDataValue[0];
recurranceDateDataTimeZoneParam = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTimeZoneParam[0];
recurranceDateDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTokens[0];
}
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].timeZoneNameData.size() > 0){
timeZoneNameData = testTimezone.timezoneDaylightCollection[2].timeZoneNameData[0];
timeZoneNameLanguage = testTimezone.timezoneDaylightCollection[2].timeZoneNameLanguage[0];
timeZoneNameTokens = testTimezone.timezoneDaylightCollection[2].timeZoneNameTokens[0];
}
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 0){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[0];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[0];
}
ASSERT_EQ("20160206T020000", dateTimeStartData);
ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
ASSERT_EQ("-0400", timeZoneOffsetToData);
ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
ASSERT_EQ("-0500", timeZoneOffsetFromData);
ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
ASSERT_EQ("Example timezone comment.", commentList);
ASSERT_EQ("null:nodata", commentListAltRep);
ASSERT_EQ("kw", commentListLanguage);
ASSERT_EQ("YO=YOYOS", commentListTokens);
ASSERT_EQ("FREQ=DAILY;COUNT=10", recurranceRuleData);
ASSERT_EQ("YAK=YES", recurranceRuleDataTokens);
ASSERT_EQ("20160205,20160207,20160216,20160305", recurranceDateData);
ASSERT_EQ("DATE", recurranceDateValue);
ASSERT_EQ("Europe/Truro", recurranceDateDataTimeZoneParam);
ASSERT_EQ("BEEP=BOOP", recurranceDateDataTokens);
ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
ASSERT_EQ("en", timeZoneNameLanguage);
ASSERT_EQ("NOPE=YES", timeZoneNameTokens);
ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
ASSERT_EQ("en", timeZoneNameLanguage);
ASSERT_EQ("Meep", xTokensData);
ASSERT_EQ("X-MOO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 1){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[1];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[1];
}
ASSERT_EQ("Moop", xTokensData);
ASSERT_EQ("X-MOO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 2){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[2];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[2];
}
ASSERT_EQ("Zaap", xTokensData);
ASSERT_EQ("X-MOO;MEEP=YIKES", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 3){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[3];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[3];
}
ASSERT_EQ("Fork", xTokensData);
ASSERT_EQ("X-ITEM", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 4){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[4];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[4];
}
ASSERT_EQ("Spoon", xTokensData);
ASSERT_EQ("X-ITEM", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 5){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[5];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[5];
}
ASSERT_EQ("Knife", xTokensData);
ASSERT_EQ("X-ITEM;DIRTY=NO", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 6){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[6];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[6];
}
ASSERT_EQ("1", xTokensData);
ASSERT_EQ("X-NOPE", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 7){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[7];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[7];
}
ASSERT_EQ("2", xTokensData);
ASSERT_EQ("X-NOPE", xTokensDataTokens);
xTokensData.clear();
xTokensDataTokens.clear();
if (testTimezone.timezoneDaylightCollection.size() > 2 &&
testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 8){
xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[8];
xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[8];
}
ASSERT_EQ("3", xTokensData);
ASSERT_EQ("X-NOPE;LONG=YES", xTokensDataTokens);
}