Microsoft.Protocols.TestSuites.MS_ASEMAIL.S03_EmailFlag.MSASEMAIL_S03_TC10_AddFlag_OptionalFlagTypeInMeetingResponse C# (CSharp) Method

MSASEMAIL_S03_TC10_AddFlag_OptionalFlagTypeInMeetingResponse() private method

        public void MSASEMAIL_S03_TC10_AddFlag_OptionalFlagTypeInMeetingResponse()
        {
            #region Call SendMail command to send a meeting response message
            this.SwitchUser(this.User2Information, true);

            string emailSubject = Common.GenerateResourceName(Site, "subject");
            string organizerEmailAddress = Common.GetMailAddress(this.User1Information.UserName, this.User1Information.UserDomain);
            string attendeeEmailAddress = Common.GetMailAddress(this.User2Information.UserName, this.User2Information.UserDomain);
            Calendar calendar = TestSuiteHelper.CreateDefaultCalendar(emailSubject, organizerEmailAddress, attendeeEmailAddress);

            // Send meeting response reply email to organizer
            this.SendMeetingResponse(calendar);
            #endregion

            #region Record user name, folder collectionId and item subject that are used in this case.
            this.RecordCaseRelativeItems(this.User1Information.UserName, this.User1Information.InboxCollectionId, emailSubject);
            #endregion

            #region Call Sync command to synchronize the meeting response message
            // Switch to user1 mailbox
            this.SwitchUser(this.User1Information, false);

            // Get the new added email item
            SyncStore syncChangeResult = this.GetSyncResult(emailSubject, this.User1Information.InboxCollectionId, null);
            Sync emailItem = TestSuiteHelper.GetSyncAddItem(syncChangeResult, emailSubject);
            #endregion

            #region Verify requirement
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R1058");

            // If server returned a Flag element which doesn't contain FlagType element, that is to say, FlagType element is not required then MS-ASEMAIL_R1058 can be captured.
            // Verify MS-ASEMAIL requirement:MS-ASEMAIL_R1058
            Site.CaptureRequirementIfIsNull(
                emailItem.Email.Flag.FlagType,
                1058,
                @"[In FlagType] The FlagType element is not required if the e-mail message is a meeting response.");
            #endregion
        }
        #endregion
S03_EmailFlag