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

MSASEMAIL_S03_TC09_AddFlag_OptionalFlagTypeInMeetingRequest() private method

        public void MSASEMAIL_S03_TC09_AddFlag_OptionalFlagTypeInMeetingRequest()
        {
            #region Call SendMail command to send one meeting request email
            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 = this.CreateDefaultCalendar(emailSubject, organizerEmailAddress, attendeeEmailAddress, null, null, null, null);

            // Record the calendar item that created in calendar folder of user1
            this.RecordCaseRelativeItems(this.User1Information.UserName, this.User1Information.CalendarCollectionId, emailSubject);

            // Send a meeting request email to user2
            this.SendMeetingRequest(emailSubject, calendar);
            #endregion

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

            #region Sync changes in user2 mailbox .
            // Get the new added email item
            SyncStore syncChangeResult = this.GetSyncResult(emailSubject, this.User2Information.InboxCollectionId, null);
            Sync emailItem = TestSuiteHelper.GetSyncAddItem(syncChangeResult, emailSubject);
            #endregion

            #region Verify requirement
            // If server returned flag element without containing flagType element, then MS-ASEMAIL_R470 can be captured.
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASEMAIL_R470");

            // Verify MS-ASEMAIL requirement:MS-ASEMAIL_R470
            Site.CaptureRequirementIfIsNull(
                emailItem.Email.Flag.FlagType,
                470,
                @"[In FlagType] The FlagType element is not required if the e-mail message is a meeting request.");
            #endregion
        }
        #endregion
S03_EmailFlag