ASSERT_EQ("PT15M", TestTask2.DurationData);
ASSERT_EQ("TEST=YES", TestTask2.DurationDataTokens);
+ // Tests for ATTACH. First ATTACH property.
+
+ std::string AttachData;
+ std::string AttachDataFormatType;
+ std::string AttachDataValue;
+ std::string AttachDataEncoding;
+ std::string AttachDataTokens;
+
+ if (TestTask.AttachList.begin() != TestTask.AttachList.end()){
+
+ AttachData = TestTask.AttachList[0];
+
+ }
+
+ if (TestTask.AttachListFormatType.begin() != TestTask.AttachListFormatType.end()){
+
+ AttachDataFormatType = TestTask.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 (TestTask.AttachList.size() > 1){
+
+ AttachData = TestTask.AttachList[1];
+
+ }
+
+ if (TestTask.AttachListFormatType.size() > 1){
+
+ AttachDataFormatType = TestTask.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 (TestTask.AttachList.size() > 2){
+
+ AttachData = TestTask.AttachList[2];
+
+ }
+
+ if (TestTask.AttachListFormatType.size() > 2){
+
+ AttachDataFormatType = TestTask.AttachListFormatType[2];
+
+ }
+
+ if (TestTask.AttachListValue.size() > 2){
+
+ AttachDataValue = TestTask.AttachListValue[2];
+
+ }
+
+ if (TestTask.AttachListFormatType.size() > 2){
+
+ AttachDataEncoding = TestTask.AttachListEncoding[2];
+
+ }
+
+ if (TestTask.AttachListTokens.size() > 2){
+
+ AttachDataTokens = TestTask.AttachListTokens[2];
+
+ }
+
+ ASSERT_EQ("VGhpcyBpcyBhbiBleGFtcGxlIGZpbGU=", AttachData);
+ ASSERT_EQ("text/plain", AttachDataFormatType);
+ ASSERT_EQ("BASE64", AttachDataEncoding);
+ ASSERT_EQ("BINARY", AttachDataValue);
+ ASSERT_EQ("STUPID=EXAMPLE", AttachDataTokens);
+
}
\ No newline at end of file