Ejemplo n.º 1
0
        /// <summary>
        /// Record the user name, folder collectionId and subjects the current test case impacts.
        /// </summary>
        /// <param name="userName">The user that current test case used.</param>
        /// <param name="folderCollectionId">The collectionId of folders that the current test case impact.</param>
        /// <param name="itemSubjects">The subject of items that the current test case impact.</param>
        protected void RecordCaseRelativeItems(string userName, string folderCollectionId, params string[] itemSubjects)
        {
            // Record the item in the specified folder.
            CreatedItems createdItems = new CreatedItems {
                CollectionId = folderCollectionId
            };

            foreach (string subject in itemSubjects)
            {
                createdItems.ItemSubject.Add(subject);
            }

            // Record the created items of User1.
            if (userName == this.User1Information.UserName)
            {
                this.User1Information.UserCreatedItems.Add(createdItems);
            }
            else if (userName == this.User2Information.UserName)
            {
                this.User2Information.UserCreatedItems.Add(createdItems);
            }
            else if (userName == this.User3Information.UserName)
            {
                this.User3Information.UserCreatedItems.Add(createdItems);
            }
            else if (userName == this.User4Information.UserName)
            {
                this.User4Information.UserCreatedItems.Add(createdItems);
            }
            else if (userName == this.User5Information.UserName)
            {
                this.User5Information.UserCreatedItems.Add(createdItems);
            }
        }
Ejemplo n.º 2
0
 public virtual void Clear()
 {
     this._scene    = null;
     this._view     = null;
     this._graph    = null;
     this._subGraph = null;
     CreatedItems.Clear();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Add the item created in test case to the item collections needed to clean up.
        /// </summary>
        /// <param name="userInformation">The identity of the user who has the item.</param>
        /// <param name="parentFolder">The CollectionId of the folder in which the item is placed.</param>
        /// <param name="itemSubject">The subject of the item to delete.</param>
        protected static void AddCreatedItemToCollection(UserInformation userInformation, string parentFolder, string itemSubject)
        {
            CreatedItems createdItems = new CreatedItems {
                CollectionId = parentFolder
            };

            createdItems.ItemSubject.Add(itemSubject);
            userInformation.UserCreatedItems.Add(createdItems);
        }
Ejemplo n.º 4
0
        public DetailPage2(CreatedItems items)
        {
            InitializeComponent();

            nameValue.Text = items.Name;
            infoValue.Text = items.Info;
            imgValue.Text  = items.Img;
            idValue.Text   = items.Id;
            string url = "https://api.qrserver.com/v1/create-qr-code/?data=" + items.Url;

            urlValue.Source = url;
        }
Ejemplo n.º 5
0
        private void AddNewItem()
        {
            var item = new Item()
            {
                Name       = ItemName,
                Desc       = Desc,
                Quantity   = Quantity,
                ItemNumber = ItemNumber,
                Price      = Price
            };

            CreatedItems.Add(item);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Record the user name, folder collectionId and subjects the current test case impacts.
        /// </summary>
        /// <param name="userInformation">The information of the user.</param>
        /// <param name="folderCollectionId">The collectionId of folders that the current test case impacts.</param>
        /// <param name="itemSubject">The subject of items that the current test case impacts.</param>
        /// <param name="isDeleted">Whether the item has been deleted and should be removed from the record.</param>
        protected static void RecordCaseRelativeItems(UserInformation userInformation, string folderCollectionId, string itemSubject, bool isDeleted)
        {
            // Record the item in the specified folder.
            CreatedItems items = new CreatedItems {
                CollectionId = folderCollectionId
            };

            items.ItemSubject.Add(itemSubject);
            bool isSame = false;

            if (!isDeleted)
            {
                if (userInformation.UserCreatedItems.Count > 0)
                {
                    foreach (CreatedItems createdItems in userInformation.UserCreatedItems)
                    {
                        if (createdItems.CollectionId == folderCollectionId && createdItems.ItemSubject[0] == itemSubject)
                        {
                            isSame = true;
                        }
                    }

                    if (!isSame)
                    {
                        userInformation.UserCreatedItems.Add(items);
                    }
                }
                else
                {
                    userInformation.UserCreatedItems.Add(items);
                }
            }
            else
            {
                if (userInformation.UserCreatedItems.Count > 0)
                {
                    foreach (CreatedItems existItem in userInformation.UserCreatedItems)
                    {
                        if (existItem.CollectionId == folderCollectionId && existItem.ItemSubject[0] == itemSubject)
                        {
                            userInformation.UserCreatedItems.Remove(existItem);
                            break;
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public void MSASPROV_S02_TC01_RemoteWipe()
        {
            #region Apply a unique DeviceType.
            // Switch the user credential to User1 to get user information.
            this.SwitchUser(this.User1Information, true);

            // Apply the unique DeviceType.
            this.DeviceType = string.Format("{0}{1}", "ASPROV", DateTime.Now.ToString("mmssfff"));
            this.PROVAdapter.ApplyDeviceType(this.DeviceType);
            this.CurrentUserInformation.UserName   = this.User1Information.UserName;
            this.CurrentUserInformation.UserDomain = this.User1Information.UserDomain;

            #endregion

            #region Acknowledge the policy setting and set the device status on server to be wipe pending
            this.AcknowledgeSecurityPolicySettings();

            // Set the device status on server to be wipe pending.
            string userEmail = Common.GetMailAddress(this.User1Information.UserName, this.User1Information.UserDomain);

            bool dataWiped = PROVSUTControlAdapter.WipeData(this.SutComputerName, userEmail, this.User1Information.UserPassword, this.DeviceType);
            Site.Assert.IsTrue(dataWiped, "The data on the device with DeviceType {0} should be wiped successfully.", this.DeviceType);
            #endregion

            #region Perform an initial remote wipe
            // Send an empty Provision request to indicate a remote wipe operation on client.
            ProvisionRequest  emptyRequest      = new ProvisionRequest();
            ProvisionResponse provisionResponse = this.PROVAdapter.Provision(emptyRequest);

            Site.Assert.IsNotNull(provisionResponse, "If the Provision command executes successfully, the response from server should not be null.");
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R653");

            // Verify MS-ASPROV requirement: MS-ASPROV_R653
            // The RemoteWipe element is not null, so this requirement can be captured.
            Site.CaptureRequirementIfIsNotNull(
                provisionResponse.ResponseData.RemoteWipe,
                653,
                @"[In Responding to an Initial Request] The RemoteWipe MUST only be included if a remote wipe has been requested for the client.");
            #endregion

            #region Perform a failure remote wipe acknowledgment
            // Set the remote wipe status to 2 to indicate a remote wipe failure on client.
            ProvisionRequest wipeRequest = new ProvisionRequest
            {
                RequestData =
                {
                    RemoteWipe = new Microsoft.Protocols.TestSuites.Common.Request.ProvisionRemoteWipe
                    {
                        Status = "2"
                    }
                }
            };

            provisionResponse = this.PROVAdapter.Provision(wipeRequest);

            if (Common.IsRequirementEnabled(1042, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    1,
                    provisionResponse.ResponseData.Status,
                    1042,
                    @"[In Appendix A: Product Behavior]  If the client reports failure, the implementation does return a value of 2 in the Status element [and a remote wipe directive]. (<4> Section 3.2.5.1.2.2:  In Exchange 2007 and Exchange 2010, if the client reports failure, the server returns a value of 1 in the Status element.)");
            }

            if (Common.IsRequirementEnabled(1048, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    2,
                    provisionResponse.ResponseData.Status,
                    1048,
                    @"[In Appendix A: Product Behavior] If the client reports failure, the implementation does return a value of 2 in the Status element [and a remote wipe directive]. (Exchange 2013 and above follow this behavior.)");
            }

            // Send an empty Provision request to indicate a remote wipe operation on client.
            provisionResponse = this.PROVAdapter.Provision(emptyRequest);
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            if (Common.IsRequirementEnabled(702, this.Site))
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R702");

                // Verify MS-ASPROV requirement: MS-ASPROV_R702
                // The RemoteWipe element is not null, so this requirement can be captured.
                Site.CaptureRequirementIfIsNotNull(
                    provisionResponse.ResponseData.RemoteWipe,
                    702,
                    @"[In Appendix B: Product Behavior] If the client reports failure, the implementation does return [a value of 2 in the Status element and] a remote wipe directive. (Exchange 2007 and above follow this behavior.)");
            }
            #endregion

            #region Perform a successful remote wipe acknowledgment
            // Set the remote wipe status to 1 to indicate a successful wipe on client.
            wipeRequest.RequestData.RemoteWipe.Status = "1";
            ProvisionResponse wipeResponse = this.PROVAdapter.Provision(wipeRequest);

            if (Common.IsRequirementEnabled(1041, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    1,
                    wipeResponse.ResponseData.Status,
                    1041,
                    @"[In Appendix A: Product Behavior] If the client reports success, the implementation does return a value of 1 in the Status element (section 2.2.2.53.2). (<3> Section 3.2.5.1.2.2:  In Exchange 2007 and Exchange 2010, if the client reports success, the server returns a value of 1 in the Status element and a remote wipe directive.)");
            }

            if (Common.IsRequirementEnabled(1047, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    1,
                    wipeResponse.ResponseData.Status,
                    1047,
                    @"[In Appendix A: Product Behavior] If the client reports success, the implementation does return a value of 1 in the Status element (section 2.2.2.53.2). (Exchange 2013 and above follow this behavior.)");
            }

            // Record the provision confirmation mail for user1 to the item collection of User1.
            string       confirmationMailSubject = "Remote Device Wipe Confirmation";
            CreatedItems inboxItemForUser1       = Common.RecordCreatedItem(this.User1Information.InboxCollectionId, confirmationMailSubject);
            this.User1Information.UserCreatedItems.Add(inboxItemForUser1);
            CreatedItems sentItemForUser1 = Common.RecordCreatedItem(this.User1Information.SentItemsCollectionId, confirmationMailSubject);
            this.User1Information.UserCreatedItems.Add(sentItemForUser1);
            #endregion

            #region Remove the device from server and perform another initial remote wipe
            // Remove the device from the mobile list after wipe operation is successful.
            bool deviceRemoved = PROVSUTControlAdapter.RemoveDevice(this.SutComputerName, userEmail, this.User1Information.UserPassword, this.DeviceType);
            Site.Assert.IsTrue(deviceRemoved, "The device with DeviceType {0} should be removed successfully.", this.DeviceType);

            // Send an empty Provision request when the client is not requested for a remote wipe.
            provisionResponse = this.PROVAdapter.Provision(emptyRequest);
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R654");

            // Verify MS-ASPROV requirement: MS-ASPROV_R654
            // The RemoteWipe element is null, so this requirement can be captured.
            Site.CaptureRequirementIfIsNull(
                provisionResponse.ResponseData.RemoteWipe,
                654,
                @"[In Responding to an Initial Request] Otherwise [if a remote wipe has not been requested for the client], it [RemoteWipe] MUST be omitted");
            #endregion
        }
Ejemplo n.º 8
0
        public void MSASPROV_S02_TC02_AccountOnlyRemoteWipe()
        {
            Site.Assume.AreEqual <string>("16.1", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The AccountOnlyRemoteWipe element is supported when the ActiveSyncProtocolVersion is 16.1.");

            #region Apply a unique DeviceType.
            // Switch the user credential to User1 to get user information.
            this.SwitchUser(this.User1Information, true);

            // Apply the unique DeviceType.
            this.DeviceType = string.Format("{0}{1}", "ASPROV", DateTime.Now.ToString("mmssfff"));
            this.PROVAdapter.ApplyDeviceType(this.DeviceType);
            this.CurrentUserInformation.UserName   = this.User1Information.UserName;
            this.CurrentUserInformation.UserDomain = this.User1Information.UserDomain;
            #endregion

            #region Acknowledge the policy setting and set the device status on server to be wipe pending
            this.AcknowledgeSecurityPolicySettings();

            // Set the device status on server to be wipe pending.
            string userEmail = Common.GetMailAddress(this.User1Information.UserName, this.User1Information.UserDomain);

            bool dataWiped = PROVSUTControlAdapter.AccountOnlyWipeData(this.SutComputerName, userEmail, this.User1Information.UserPassword, this.DeviceType);
            Site.Assert.IsTrue(dataWiped, "The data on the device with DeviceType {0} should be wiped successfully.", this.DeviceType);
            #endregion

            #region Perform an initial account only remote wipe
            // Send an empty Provision request to indicate an account only remote wipe operation on client.
            ProvisionRequest  emptyRequest      = new ProvisionRequest();
            ProvisionResponse provisionResponse = this.PROVAdapter.Provision(emptyRequest);

            Site.Assert.IsNotNull(provisionResponse, "If the Provision command executes successfully, the response from server should not be null.");
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            if (Common.IsRequirementEnabled(66613, this.Site))
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R66613");

                // Verify MS-ASPROV requirement: MS-ASPROV_R66613
                // The AccountOnlyRemoteWipe element is not null, so this requirement can be captured.
                Site.CaptureRequirementIfIsNotNull(
                    provisionResponse.ResponseData.AccountOnlyRemoteWipe,
                    66613,
                    @"[In Appendix B: Product Behavior] The [RemoteWipe or] AccountOnlyRemoteWipe MUST only be included if [a remote wipe or] an account only remote wipe has been requested for the client. (Exchange 2019 follow this behavior.)");
            }
            #endregion

            #region Perform a failure account only remote wipe acknowledgment
            // Set the account only remote wipe status to 2 to indicate an account only remote wipe failure on client.
            ProvisionRequest wipeRequest = new ProvisionRequest
            {
                RequestData =
                {
                    AccountOnlyRemoteWipe = new Microsoft.Protocols.TestSuites.Common.Request.ProvisionAccountOnlyRemoteWipe
                    {
                        Status            = 2
                    }
                }
            };

            provisionResponse = this.PROVAdapter.Provision(wipeRequest);

            if (Common.IsRequirementEnabled(66610, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    2,
                    provisionResponse.ResponseData.Status,
                    66610,
                    @"[In Appendix B: Product Behavior]  If the client reports failure, the server SHOULD return a value of 2 in the Status element[ and an account only remote wipe directive]. (Exchange 2019 follow this behavior.)");
            }

            // Send an empty Provision request to indicate an account only remote wipe operation on client.
            provisionResponse = this.PROVAdapter.Provision(emptyRequest);
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            if (Common.IsRequirementEnabled(66611, this.Site))
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R66611");

                // Verify MS-ASPROV requirement: MS-ASPROV_R66611
                // The AccountOnlyRemoteWipe element is not null, so this requirement can be captured.
                Site.CaptureRequirementIfIsNotNull(
                    provisionResponse.ResponseData.AccountOnlyRemoteWipe,
                    66611,
                    @"[In Appendix B: Product Behavior] If the client reports failure, the server SHOULD return [a value of 2 in the Status element and ]an account only remote wipe directive. (Exchange 2019 follow this behavior.)");
            }
            #endregion

            #region Perform a successful account only remote wipe acknowledgment
            // Set the account only remote wipe status to 1 to indicate a successful wipe on client.
            wipeRequest.RequestData.AccountOnlyRemoteWipe.Status = 1;
            ProvisionResponse wipeResponse = this.PROVAdapter.Provision(wipeRequest);

            if (Common.IsRequirementEnabled(66609, this.Site))
            {
                this.Site.CaptureRequirementIfAreEqual <byte>(
                    1,
                    wipeResponse.ResponseData.Status,
                    66609,
                    @"[In Appendix B: Product Behavior] If the client reports success, the server SHOULD return a value of 1 in the Status element (section 2.2.2.54.2). (Exchange 2019 follow this behavior.)");
            }

            // Record the provision confirmation mail for user1 to the item collection of User1.
            string       confirmationMailSubject = "Remote Device Wipe Confirmation";
            CreatedItems inboxItemForUser1       = Common.RecordCreatedItem(this.User1Information.InboxCollectionId, confirmationMailSubject);
            this.User1Information.UserCreatedItems.Add(inboxItemForUser1);
            CreatedItems sentItemForUser1 = Common.RecordCreatedItem(this.User1Information.SentItemsCollectionId, confirmationMailSubject);
            this.User1Information.UserCreatedItems.Add(sentItemForUser1);
            #endregion

            #region Remove the device from server and perform another initial account only remote wipe
            // Remove the device from the mobile list after wipe operation is successful.
            bool deviceRemoved = PROVSUTControlAdapter.RemoveDevice(this.SutComputerName, userEmail, this.User1Information.UserPassword, this.DeviceType);
            Site.Assert.IsTrue(deviceRemoved, "The device with DeviceType {0} should be removed successfully.", this.DeviceType);

            // Send an empty Provision request when the client is not requested for an account only remote wipe.
            provisionResponse = this.PROVAdapter.Provision(emptyRequest);
            Site.Assert.AreEqual <byte>(1, provisionResponse.ResponseData.Status, "The server should return status code 1 to indicate a success.");

            if (Common.IsRequirementEnabled(66615, this.Site))
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R66615");

                // Verify MS-ASPROV requirement: MS-ASPROV_R66615
                // The AccountOnlyRemoteWipe element is null, so this requirement can be captured.
                Site.CaptureRequirementIfIsNull(
                    provisionResponse.ResponseData.AccountOnlyRemoteWipe,
                    66615,
                    @"[In Appendix B: Product Behavior] Otherwise [if an account only remote wipe has not been requested for the client], it [Account Only RemoteWipe] MUST be omitted. (Exchange 2019 follow this behavior.)");
            }
            #endregion
        }
        public void MSASHTTP_S01_TC10_CommandParameter_Occurrence_PlainText()
        {
            #region User3 calls SendMail to send a meeting request to User2
            IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>();
            string sendMailSubject   = Common.GenerateResourceName(this.Site, "SendMail");
            string smartReplySubject = Common.GenerateResourceName(this.Site, "SmartReply");

            // Call ConfigureRequestPrefixFields to change the QueryValueType.
            requestPrefix.Add(HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.PlainText.ToString());
            this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix);

            // Switch the current user to user3 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserThreeInformation, true);

            // Call SendMail command to send the meeting request to User2.
            this.SendMeetingRequest(sendMailSubject);
            #endregion

            #region User2 calls SmartReply command to reply the request to User3 with Occurrence command parameter
            // Call ConfigureRequestPrefixFields to switch the credential to User2 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserTwoInformation, true);

            // Call Sync command to get the ServerId of the received meeting request.
            string itemServerId = this.LoopToSyncItem(this.UserTwoInformation.InboxCollectionId, sendMailSubject, true);

            // Add the received item to the item collection of User2.
            CreatedItems inboxItemForUserTwo = new CreatedItems
            {
                CollectionId = this.UserTwoInformation.InboxCollectionId
            };
            inboxItemForUserTwo.ItemSubject.Add(sendMailSubject);
            this.UserTwoInformation.UserCreatedItems.Add(inboxItemForUserTwo);

            // Call Sync command to get the ServerId of the calendar item.
            string calendarItemServerId = this.LoopToSyncItem(this.UserTwoInformation.CalendarCollectionId, sendMailSubject, true);

            CreatedItems calendarItemForUserTwo = new CreatedItems
            {
                CollectionId = this.UserTwoInformation.CalendarCollectionId
            };
            calendarItemForUserTwo.ItemSubject.Add(sendMailSubject);
            this.UserTwoInformation.UserCreatedItems.Add(calendarItemForUserTwo);

            // Call SmartReply command with the Occurrence command parameter.
            string startTime               = (string)this.GetElementValueFromSyncResponse(this.UserTwoInformation.CalendarCollectionId, calendarItemServerId, Response.ItemsChoiceType8.StartTime);
            string occurrence              = TestSuiteHelper.ConvertInstanceIdFormat(startTime);
            string userTwoMailboxAddress   = Common.GetMailAddress(this.UserTwoInformation.UserName, this.UserTwoInformation.UserDomain);
            string userThreeMailboxAddress = Common.GetMailAddress(this.UserThreeInformation.UserName, this.UserThreeInformation.UserDomain);
            this.CallSmartReplyCommand(userTwoMailboxAddress, userThreeMailboxAddress, itemServerId, smartReplySubject, null, null, occurrence);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R513");

            // Verify MS-ASHTTP requirement: MS-ASHTTP_R513
            // SmartReply command executed successfully with setting Occurrence command parameter, so this requirement can be captured.
            Site.CaptureRequirement(
                513,
                @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is described as] A string that specifies the ID of a particular occurrence in a recurring meeting.");

            #endregion

            #region User3 gets the reply mail
            // Call ConfigureRequestPrefixFields to switch the credential to User3 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserThreeInformation, false);

            // Call Sync command to get the ServerId of the received the reply.
            this.LoopToSyncItem(this.UserThreeInformation.InboxCollectionId, smartReplySubject, true);
            this.AddCreatedItemToCollection("User3", this.UserThreeInformation.InboxCollectionId, smartReplySubject);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R529");

            // Verify MS-ASHTTP requirement: MS-ASHTTP_R529
            // SmartReply command executed successfully with setting Occurrence command parameter, so this requirement can be captured.
            Site.CaptureRequirement(
                529,
                @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is used by] SmartReply.");
            #endregion

            #region Reset the query value type and user credential.
            requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site);
            HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix);
            this.SwitchUser(this.UserOneInformation, false);
            #endregion
        }
        public void MSASHTTP_S01_TC09_CommandParameter_Occurrence_Base64()
        {
            #region User3 calls SendMail to send a meeting request to User2.
            IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>();
            string sendMailSubject     = Common.GenerateResourceName(this.Site, "SendMail");
            string smartForwardSubject = Common.GenerateResourceName(this.Site, "SmartForward");

            // Call ConfigureRequestPrefixFields to change the QueryValueType to Base64.
            requestPrefix.Add(HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.Base64.ToString());
            this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix);

            // Switch the current user to user3 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserThreeInformation, true);

            // Call SendMail command to send the meeting request to User2.
            this.SendMeetingRequest(sendMailSubject);
            #endregion

            #region User2 calls MeetingResponse command to accept the received meeting request and forward it to User1.
            // Call ConfigureRequestPrefixFields to switch the credential to User2 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserTwoInformation, true);

            // Call Sync command to get the ServerId of the received meeting request.
            string itemServerId = this.LoopToSyncItem(this.UserTwoInformation.InboxCollectionId, sendMailSubject, true);

            // Add the received item to the item collection of User2.
            CreatedItems inboxItemForUserTwo = new CreatedItems
            {
                CollectionId = this.UserTwoInformation.InboxCollectionId
            };
            inboxItemForUserTwo.ItemSubject.Add(sendMailSubject);
            this.UserTwoInformation.UserCreatedItems.Add(inboxItemForUserTwo);

            // Check the calendar item if is exist.
            string calendarItemServerId = this.LoopToSyncItem(this.UserTwoInformation.CalendarCollectionId, sendMailSubject, true);

            CreatedItems calendarItemForUserTwo = new CreatedItems
            {
                CollectionId = this.UserTwoInformation.CalendarCollectionId
            };
            calendarItemForUserTwo.ItemSubject.Add(sendMailSubject);
            this.UserTwoInformation.UserCreatedItems.Add(calendarItemForUserTwo);

            // Call MeetingResponse command to accept the received meeting request.
            this.CallMeetingResponseCommand(this.UserTwoInformation.InboxCollectionId, itemServerId);

            // The accepted meeting request will be moved to Delete Items folder.
            itemServerId = this.LoopToSyncItem(this.UserTwoInformation.DeletedItemsCollectionId, sendMailSubject, true);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R432");

            // Verify MS-ASHTTP requirement: MS-ASHTTP_R432
            // MeetingResponse command is executed successfully, so this requirement can be captured.
            Site.CaptureRequirementIfIsNotNull(
                itemServerId,
                432,
                @"[In Command Codes] [Command] MeetingResponse [is] used to accept [, tentatively accept , or decline] a meeting request in the user's Inbox folder.");

            // Remove the inboxItemForUserTwo object from the clean up list since it has been moved to Delete Items folder.
            this.UserTwoInformation.UserCreatedItems.Remove(inboxItemForUserTwo);
            this.AddCreatedItemToCollection("User2", this.UserTwoInformation.DeletedItemsCollectionId, sendMailSubject);

            // Call SmartForward command to forward the meeting to User1
            string startTime             = (string)this.GetElementValueFromSyncResponse(this.UserTwoInformation.CalendarCollectionId, calendarItemServerId, Response.ItemsChoiceType8.StartTime);
            string occurrence            = TestSuiteHelper.ConvertInstanceIdFormat(startTime);
            string userOneMailboxAddress = Common.GetMailAddress(this.UserOneInformation.UserName, this.UserOneInformation.UserDomain);
            string userTwoMailboxAddress = Common.GetMailAddress(this.UserTwoInformation.UserName, this.UserTwoInformation.UserDomain);
            this.CallSmartForwardCommand(userTwoMailboxAddress, userOneMailboxAddress, itemServerId, smartForwardSubject, null, null, occurrence);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R513");

            // Verify MS-ASHTTP requirement: MS-ASHTTP_R513
            // SmartForward command executed successfully with setting Occurrence command parameter, so this requirement can be captured.
            Site.CaptureRequirement(
                513,
                @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is described as] A string that specifies the ID of a particular occurrence in a recurring meeting.");

            this.AddCreatedItemToCollection("User3", this.UserThreeInformation.DeletedItemsCollectionId, "Meeting Forward Notification: " + smartForwardSubject);
            #endregion

            #region User1 gets the forwarded meeting request
            // Call ConfigureRequestPrefixFields to switch the credential to User1 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserOneInformation, true);

            this.AddCreatedItemToCollection("User1", this.UserOneInformation.InboxCollectionId, smartForwardSubject);
            this.AddCreatedItemToCollection("User1", this.UserOneInformation.CalendarCollectionId, smartForwardSubject);

            // Call Sync command to get the ServerId of the received meeting request.
            this.LoopToSyncItem(this.UserOneInformation.InboxCollectionId, smartForwardSubject, true);

            // Call Sync command to get the ServerId of the calendar item.
            this.LoopToSyncItem(this.UserOneInformation.CalendarCollectionId, smartForwardSubject, true);
            #endregion

            #region User3 gets the Meeting Forward Notification email in the Deleted Items folder.
            // Call ConfigureRequestPrefixFields to switch the credential to User3 and synchronize the collection hierarchy.
            this.SwitchUser(this.UserThreeInformation, false);

            // Call Sync command to get the ServerId of the received meeting request and the notification email.
            this.LoopToSyncItem(this.UserThreeInformation.DeletedItemsCollectionId, "Meeting Forward Notification: " + smartForwardSubject, true);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R119");

            // Verify MS-ASHTTP requirement: MS-ASHTTP_R119
            // SmartForward command executed successfully with setting Occurrence command parameter, so this requirement can be captured.
            Site.CaptureRequirement(
                119,
                @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is used by] SmartForward.");
            #endregion

            #region Reset the query value type.
            requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site);
            HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix);
            #endregion
        }