public void MSASEMAIL_S03_TC27_FlagTask_RequiredProperties()
{
#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,tasks:Subject,FlagType = "Flag for follow up",tasks:StartDate and tasks:UtcStartDate,tasks:DueDate and tasks:UtcDueDate,tasks:ReminderSet,tasks:ReminderTime
Request.Flag flag = new Request.Flag
{
Status = "2",
FlagType = "Flag for follow up",
Subject = Common.GenerateResourceName(Site, "FlagSubject"),
StartDate = DateTime.Now,
StartDateSpecified = true,
UtcStartDate = DateTime.Now,
UtcStartDateSpecified = true,
DueDate = DateTime.Now.AddDays(20),
DueDateSpecified = true,
UtcDueDate = DateTime.Now.AddDays(20),
UtcDueDateSpecified = true,
ReminderSet=1,
ReminderSetSpecified=true,
ReminderTime = DateTime.Now,
ReminderTimeSpecified=true
};
// 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_R942 can be captured.
// Add the debug information
this.Site.CaptureRequirement(
942,
@"[In Updating E-Mail Flags] When Action is Flag a task, Required Properties from Device are: Status = 2, tasks:Subject (section 2.2.2.75) = user defined, FlagType = ""Flag for follow up"", tasks:StartDate and tasks:UtcStartDate, tasks:DueDate and tasks:UtcDueDate, tasks:ReminderSet (section 2.2.2.64), tasks:ReminderTime (section 2.2.2.65).");
#endregion
}
#endregion