ASSERT_EQ("PT5M", RepeatData);
ASSERT_EQ("NEVER=SLEEP", RepeatTokens);
+ // Tests for ATTACH. First ATTACH property.
+
+ std::string AttachData;
+ std::string AttachDataFormatType;
+ std::string AttachDataValue;
+ std::string AttachDataEncoding;
+ std::string AttachDataTokens;
+
+ if (TestEvent.CalendarAlarmData[0].AttachList.begin() != TestEvent.CalendarAlarmData[0].AttachList.end()){
+
+ AttachData = TestEvent.AttachList[0];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListFormatType.begin() != TestEvent.CalendarAlarmData[0].AttachListFormatType.end()){
+
+ AttachDataFormatType = TestEvent.AttachListFormatType[0];
+
+ }
+
+ ASSERT_EQ("http://www.example.com/", AttachData);
+ ASSERT_EQ("application/internet-shortcut", AttachDataFormatType);
+
+ // Second ATTACH property.
+
+ AttachData.clear();
+ AttachDataFormatType.clear();
+ AttachDataValue.clear();
+ AttachDataEncoding.clear();
+
+ if (TestEvent.CalendarAlarmData[0].AttachList.size() > 1){
+
+ AttachData = TestEvent.CalendarAlarmData[0].AttachList[1];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListFormatType.size() > 1){
+
+ AttachDataFormatType = TestEvent.CalendarAlarmData[0].AttachListFormatType[1];
+
+ }
+
+ ASSERT_EQ("http://www.example.com/page2.html", AttachData);
+ ASSERT_EQ("application/internet-shortcut", AttachDataFormatType);
+
+ // Third ATTACH property.
+
+ AttachData.clear();
+ AttachDataFormatType.clear();
+ AttachDataValue.clear();
+ AttachDataEncoding.clear();
+ AttachDataTokens.clear();
+
+ if (TestEvent.CalendarAlarmData[0].AttachList.size() > 2){
+
+ AttachData = TestEvent.CalendarAlarmData[0].AttachList[2];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListFormatType.size() > 2){
+
+ AttachDataFormatType = TestEvent.CalendarAlarmData[0].AttachListFormatType[2];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListValue.size() > 2){
+
+ AttachDataValue = TestEvent.CalendarAlarmData[0].AttachListValue[2];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListFormatType.size() > 2){
+
+ AttachDataEncoding = TestEvent.CalendarAlarmData[0].AttachListEncoding[2];
+
+ }
+
+ if (TestEvent.CalendarAlarmData[0].AttachListTokens.size() > 2){
+
+ AttachDataTokens = TestEvent.CalendarAlarmData[0].AttachListTokens[2];
+
+ }
+
+ ASSERT_EQ("VGhpcyBpcyBhbiBleGFtcGxlIGZpbGU=", AttachData);
+ ASSERT_EQ("text/plain", AttachDataFormatType);
+ ASSERT_EQ("BASE64", AttachDataEncoding);
+ ASSERT_EQ("BINARY", AttachDataValue);
+ ASSERT_EQ("STUPID=EXAMPLE", AttachDataTokens);
+
// Test the first X-Token.
if (TestEvent.CalendarAlarmData[0].XTokensData.size() > 0){
string AttendeeDataTokens;
string AttendeeData;
- string AttachData;
- string AttachDataFormatType;
- string AttachDataValue;
- string AttachDataEncoding;
- string AttachDataTokens;
+ AttachData.clear();
+ AttachDataFormatType.clear();
+ AttachDataValue.clear();
+ AttachDataEncoding.clear();
+ AttachDataTokens.clear();
if (TestEvent.CalendarAlarmData.size() > 2){