Microsoft.Protocols.TestSuites.MS_ASEMAIL.S02_EmailVoiceAttachment.MSASEMAIL_S02_TC02_VoiceAttachment_IncludedUmCallerIDInRequest C# (CSharp) Method

MSASEMAIL_S02_TC02_VoiceAttachment_IncludedUmCallerIDInRequest() private method

        public void MSASEMAIL_S02_TC02_VoiceAttachment_IncludedUmCallerIDInRequest()
        {
            Site.Assume.AreNotEqual<string>("12.1", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The UmCallerID element is not supported when the ActiveSyncProtocolVersion is 12.1.");

            #region Call SendMail command to send a mail with an electronic voice mail attachment
            string emailSubject = Common.GenerateResourceName(Site, "subject");
            string firstVoiceFilePath = "testVoice.mp3";
            string secondVoiceFilePath = "secondTestVoice.mp3";
            this.SendVoiceMail(emailSubject, firstVoiceFilePath, secondVoiceFilePath);
            #endregion

            #region Calls Sync command to update email
            string newUmCallerId = "77777777777";
            string umcallerIDElement = "<UmCallerID xmlns=\"Email2\">" + newUmCallerId + "</UmCallerID>";
            string statusCode = this.UpdateVoiceEmailWithInvalidData(umcallerIDElement);
            #endregion

            #region Verify requirement
            // If statusCode equals "6", means server response error status code 6, then MS-ASEMAIL_R817 is verified
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R817");

            // Verify MS-ASEMAIL requirement: MS-ASEMAIL_R817
            Site.CaptureRequirementIfAreEqual<string>(
                "6",
                statusCode,
                817,
                @"[In UmCallerID] 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 client attempts to send the email2:UmCallerId element to the server.");
            #endregion
        }
        #endregion