ASSERT_EQ("FREQ=DAILY;COUNT=10", TestJournal.RecurranceRuleData);
ASSERT_EQ("TEST=DATA", TestJournal.RecurranceRuleDataTokens);
+ // Tests for ATTACH. First ATTACH property.
+
+ std::string AttachData;
+ std::string AttachDataFormatType;
+ std::string AttachDataValue;
+ std::string AttachDataEncoding;
+ std::string AttachDataTokens;
+
+ if (TestJournal.AttachList.begin() != TestJournal.AttachList.end()){
+
+ AttachData = TestJournal.AttachList[0];
+
+ }
+
+ if (TestJournal.AttachListFormatType.begin() != TestJournal.AttachListFormatType.end()){
+
+ AttachDataFormatType = TestJournal.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 (TestJournal.AttachList.size() > 1){
+
+ AttachData = TestJournal.AttachList[1];
+
+ }
+
+ if (TestJournal.AttachListFormatType.size() > 1){
+
+ AttachDataFormatType = TestJournal.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 (TestJournal.AttachList.size() > 2){
+
+ AttachData = TestJournal.AttachList[2];
+
+ }
+
+ if (TestJournal.AttachListFormatType.size() > 2){
+
+ AttachDataFormatType = TestJournal.AttachListFormatType[2];
+
+ }
+
+ if (TestJournal.AttachListValue.size() > 2){
+
+ AttachDataValue = TestJournal.AttachListValue[2];
+
+ }
+
+ if (TestJournal.AttachListFormatType.size() > 2){
+
+ AttachDataEncoding = TestJournal.AttachListEncoding[2];
+
+ }
+
+ if (TestJournal.AttachListTokens.size() > 2){
+
+ AttachDataTokens = TestJournal.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