public void MSASEMAIL_S03_TC26_FlagEmail_RequiredPropertiesOption2()
{
#region Call SendMail command to send an email.
string emailSubject = Common.GenerateResourceName(Site, "subject");
this.SendPlaintextEmail(emailSubject, string.Empty, string.Empty);
#endregion
#region Call Sync command with Change element to add flag with properties Status = 2, FlagType = "Flag for follow up", tasks:DateCompleted, CompleteTime.
Request.Flag flag = new Request.Flag
{
Status = "2",
FlagType = "Flag for follow up",
DateCompletedSpecified = true,
DateCompleted = DateTime.Now.AddDays(1),
CompleteTimeSpecified = true,
CompleteTime = DateTime.Now.AddDays(1)
};
// Get the email item
SyncStore getEmailItem = this.GetSyncResult(emailSubject, this.User2Information.InboxCollectionId, null);
Sync item = TestSuiteHelper.GetSyncAddItem(getEmailItem, emailSubject);
// Add flag to an email item
SyncStore getChangedResult = this.AddEmailFag(this.User2Information, getEmailItem, emailSubject, flag);
item = TestSuiteHelper.GetSyncChangeItem(getChangedResult, item.ServerId);
Site.Assert.IsNotNull(item, "The message with subject {0} should be found in the folder {1} of user {2}.", emailSubject, FolderType.Inbox.ToString(), this.User2Information.UserName);
Site.Assert.AreEqual<byte>(
1,
getChangedResult.CollectionStatus,
"The server should return a Status 1 in the Sync command response indicate set flag success.");
#endregion
#region Verify requirements
// If server returned a Status 1, that is to say, the sync command is successful, then MS-ASEMAIL_R941 can be captured.
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R941");
// Verify MS-ASEMAIL requirement: MS-ASEMAIL_R941
Site.CaptureRequirement(
941,
@"[In Updating E-Mail Flags] When Action is Flag an email, Required Properties from Device are:Status = 2, FlagType (section 2.2.2.35) = ""Flag for follow up"", tasks:DateCompleted (section 2.2.2.23), CompleteTime (section 2.2.2.19).");
#endregion
}
#endregion