public void MSASEMAIL_S03_TC06_AddFlag_UtcDueDateBeforeUtcStartDate()
{
#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 UtcDueDate occurs before UtcStartDat.
Request.Flag flag = new Request.Flag
{
Status = "2",
FlagType = "for Follow Up",
StartDate = DateTime.Now.AddDays(20),
StartDateSpecified = true,
UtcStartDate = DateTime.Now.AddDays(20),
UtcStartDateSpecified = true,
DueDate = DateTime.Now.AddDays(30),
DueDateSpecified = true,
UtcDueDate = DateTime.Now,
UtcDueDateSpecified = true
};
// Get the synchronization result
SyncStore getEmailItem = this.GetSyncResult(emailSubject, this.User2Information.InboxCollectionId, null);
// Get the new added email item
Sync emailItem = TestSuiteHelper.GetSyncAddItem(getEmailItem, emailSubject);
// Add flag to the email item
SyncStore updateResult = this.UpdateEmail(this.User2Information.InboxCollectionId, getEmailItem.SyncKey, null, emailItem.ServerId, flag, null);
Site.Assert.AreEqual<int>(
6,
int.Parse(updateResult.ChangeResponses[0].Status),
"The server should return a Status 6 in the Sync command response if the UtcDueDate occurs before UtcStartDate.");
#endregion
#region Verify requirements
// If the server returns a Status element value of 6 in the Sync command response, then MS-ASEMAIL_R862 and MS-ASEMAIL_R851 can be captured.
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R851");
// Verify MS-ASEMAIL requirement: MS-ASEMAIL_R851
Site.CaptureRequirement(
851,
@"[In UtcDueDate] The server returns a Status element ([MS-ASCMD] section 2.2.3.167.16) value of 6 in the Sync command response ([MS-ASCMD] section 2.2.2.20) if this condition[When a flag is updated, the tasks:UtcDueDate element value MUST NOT occur before the tasks:UtcStartDate element (section 2.2.2.87) value. ] is not met.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R862");
// Verify MS-ASEMAIL requirement: MS-ASEMAIL_R862
Site.CaptureRequirement(
862,
@"[In UtcStartDate] The server returns a Status element ([MS-ASCMD] section 2.2.3.167.16) value of 6 in the Sync command response ([MS-ASCMD] section 2.2.2.20) if this condition[When a flag is updated, the tasks:UtcStartDate element value MUST occur before the tasks:UtcDueDate element (section 2.2.2.86) value. ] is not met.");
#endregion
}
#endregion