public void MSASEMAIL_S03_TC02_AddFlag_InvalidStatus()
{
#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 a flag with invalid Status value.
Request.Flag flag = new Request.Flag
{
Status = "3",
FlagType = "for Follow Up",
CompleteTime = DateTime.Now,
CompleteTimeSpecified = true,
DateCompleted = DateTime.Now,
DateCompletedSpecified = 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 flag Status element is set to a value other than 0, 1, or 2.");
#endregion
#region Verify requirement
// If the server returns a Status element value of 6 in the Sync command response, then MS-ASEMAIL_R757 can be captured.
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R757");
// Verify MS-ASEMAIL requirement: MS-ASEMAIL_R757
Site.CaptureRequirement(
757,
@"[In Status] 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 the flag Status element is set to a value other than 0, 1, or 2.");
#endregion
}
#endregion