コード例 #1
0
        /// <summary>
        /// Gets synchronization information that enables folders to be synchronized
        /// between a client and a server.
        /// </summary>
        /// <param name="request">A request to the SyncFolderHierarchy operation.</param>
        /// <returns>A response from the SyncFolderHierarchy operation.</returns>
        public SyncFolderHierarchyResponseType SyncFolderHierarchy(SyncFolderHierarchyType request)
        {
            if (request == null)
            {
                throw new ArgumentException("The SyncFolderHierarchy request should not be null.");
            }

            SyncFolderHierarchyResponseType response = this.exchangeServiceBinding.SyncFolderHierarchy(request);

            Site.Assert.IsNotNull(response, "If the operation is successful, the response should not be null.");

            this.VerifySoapVersion();
            this.VerifyTransportType();
            this.VerifySyncFolderHierarchyResponse(response, this.exchangeServiceBinding.IsSchemaValidated);
            return(response);
        }
        public void MSOXWSSYNC_S03_TC02_SyncFolderHierarchy_WithAllOptionalElements()
        {
            #region Step 1. Client invokes SyncFolderHierarchy operation to server to get initial syncState.
            // Add inbox folder and search folder into list
            this.FolderIdNameType.Add(DistinguishedFolderIdNameType.inbox);
            this.FolderIdNameType.Add(DistinguishedFolderIdNameType.searchfolders);

            // Get the initial syncState
            SyncFolderHierarchyResponseMessageType[] responseMessage = new SyncFolderHierarchyResponseMessageType[this.FolderIdNameType.Count];
            SyncFolderHierarchyResponseType[] response = new SyncFolderHierarchyResponseType[this.FolderIdNameType.Count];

            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                SyncFolderHierarchyType request = TestSuiteHelper.CreateSyncFolderHierarchyRequest(this.FolderIdNameType[i], DefaultShapeNamesType.Default, true, true);
                response[i] = this.SYNCAdapter.SyncFolderHierarchy(request);
                responseMessage[i] = TestSuiteHelper.EnsureResponse<SyncFolderHierarchyResponseMessageType>(response[i]);
            }
            #endregion

            #region Step 2. Client invokes CreateSubFolder to create folders.
            // Generate the created folder name
            string firstLevelFolderName = Common.GenerateResourceName(this.Site, "FirstLevelFolder");
            string secondLevelFolderName = Common.GenerateResourceName(this.Site, "SecondLevelFolder");

            // Create folders under inbox, calendar, contacts, tasks and search folder
            this.CreateMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                firstLevelFolderName,
                secondLevelFolderName,
                TestSuiteBase.SearchText);
            #endregion

            #region Step 3. Client invokes SyncFolderHierarchy operation to sync the operation result in Step 2.
            // Call SyncFolderHierarchy operation to sync the create folder operation result 
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion

            #region Step 4. Client invokes FindAndUpdateFolderName to change the folder's name.
            // Generate a new folder name
            string newFolderName = Common.GenerateResourceName(this.Site, "NewFolderName");

            // Update the specific folder's name to a new one
            this.UpdateMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                firstLevelFolderName,
                secondLevelFolderName,
                newFolderName);
            #endregion

            #region  Step 5. Client invokes SyncFolderHierarchy operation with previous syncState to sync the operation result in Step 4.
            // Call SyncFolderHierarchy operation to sync the update folder operation result
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion

            #region Step 6. Client invokes FindAndDeleteSubFolder to delete the folder that created in step 2.
            // Delete the sub folder that created in step 2
            this.DeleteMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                newFolderName);
            #endregion

            #region Step 7. Client invokes SyncFolderHierarchy operation with previous syncState to sync the operation result of Step 6.
            // Call SyncFolderHierarchy operation to sync the delete folder operation result
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion
        }
コード例 #3
0
        /// <summary>
        /// The capture code of requirements in SyncFolderHierarchy operation.
        /// </summary>
        /// <param name="syncFoldHierarchyResponse">The response message for SyncFolderHierarchy operation.</param>
        /// <param name="isSchemaValidated">A Boolean value indicates the schema validation result, true means the schema is validated, false means the schema is not validated.</param>
        private void VerifySyncFolderHierarchyResponse(SyncFolderHierarchyResponseType syncFoldHierarchyResponse, bool isSchemaValidated)
        {
            // Assert the response is not null
            Site.Assert.IsNotNull(syncFoldHierarchyResponse, "If the request is successful, the response should not be null.");

            // The SyncFolderHierarchy operation MUST return one SyncFolderHierarchyResponseMessage element.
            Site.Assert.AreEqual<int>(1, syncFoldHierarchyResponse.ResponseMessages.Items.Length, "The SyncFolderHierarchy operation MUST return one SyncFolderHierarchyResponseMessage element.");
            SyncFolderHierarchyResponseMessageType syncFoldHierarchyResponseMessage = (SyncFolderHierarchyResponseMessageType)syncFoldHierarchyResponse.ResponseMessages.Items[0];

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R441
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                441,
                @"[In m:SyncFolderHierarchyResponseMessageType Complex Type] [The schema of ""SyncFolderHierarchyResponseMessageType"" is:]
                <xs:complexType name=""SyncFolderHierarchyResponseMessageType"">
                  <xs:complexContent>
                    <xs:extension
                      base=""m:ResponseMessageType""
                    >
                      <xs:sequence>
                        <xs:element name=""SyncState""
                          type=""xs:string""
                          minOccurs=""0""
                         />
                        <xs:element name=""IncludesLastFolderInRange""
                          type=""xs:boolean""
                          minOccurs=""0""
                         />
                        <xs:element name=""Changes""
                          type=""t:SyncFolderHierarchyChangesType""
                          minOccurs=""0""
                         />
                      </xs:sequence>
                    </xs:extension>
                  </xs:complexContent>
                </xs:complexType>");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R442
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                442,
                @"[In m:SyncFolderHierarchyResponseMessageType Complex Type] The type of SyncState is xs:string [XMLSCHEMA2]");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R443
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                443,
                @"[In m:SyncFolderHierarchyResponseMessageType Complex Type] The type of IncludesLastFolderInRange is xs:boolean [XMLSCHEMA2].");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R48.
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                48,
                @"[In m:SyncFolderHierarchyResponseMessageType Complex Type] The type of Changes is t:SyncFolderHierarchyChangesType (section 3.1.4.1.3.1).");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R447
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                447,
                @"[In t:SyncFolderHierarchyChangesType Complex Type] The SyncFolderHierarchyChangesType complex type specifies a sequenced array of change types that describe the differences between the folders on the client and the folders on the server. 
                <xs:complexType name=""SyncFolderHierarchyChangesType"">
                  <xs:sequence>
                    <xs:choice
                      maxOccurs=""unbounded""
                      minOccurs=""0""
                    >
                      <xs:element name=""Create""
                        type=""t:SyncFolderHierarchyCreateOrUpdateType""
                       />
                      <xs:element name=""Update""
                        type=""t:SyncFolderHierarchyCreateOrUpdateType""
                       />
                      <xs:element name=""Delete""
                        type=""t:SyncFolderHierarchyDeleteType""
                       />
                    </xs:choice>
                  </xs:sequence>
                </xs:complexType>");

            if (null != syncFoldHierarchyResponseMessage.Changes && null != syncFoldHierarchyResponseMessage.Changes.Items)
            {
                for (int i = 0; i < syncFoldHierarchyResponseMessage.Changes.ItemsElementName.Length; i++)
                {
                    if (syncFoldHierarchyResponseMessage.Changes.ItemsElementName[i] == ItemsChoiceType.Create)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSSYNC_R83");

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R83
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            83,
                            @"[In t:SyncFolderHierarchyChangesType Complex Type] The type of Create is t:SyncFolderHierarchyCreateOrUpdateType (section 3.1.4.1.3.2).");
                    }

                    // If the change is updated, verify MS-OXWSSYNC_R448 and requirements in update operation.
                    if (syncFoldHierarchyResponseMessage.Changes.ItemsElementName[i] == ItemsChoiceType.Update)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSSYNC_R448");

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R448
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            448,
                            @"[In t:SyncFolderHierarchyChangesType Complex Type] The type of Update is t:SyncFolderHierarchyCreateOrUpdateType.");
                    }

                    // If the change is updated or created, verify MS-OXWSSYNC_R449 and requirements in update operation or create operation.
                    if (syncFoldHierarchyResponseMessage.Changes.ItemsElementName[i] == ItemsChoiceType.Update || syncFoldHierarchyResponseMessage.Changes.ItemsElementName[i] == ItemsChoiceType.Create)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSSYNC_R449");

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R449
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            449,
                            @"[In t:SyncFolderHierarchyCreateOrUpdateType Complex Type] The SyncFolderHierarchyCreateOrUpdateType complex type specifies a single folder to create or update in the client data store. 
xs:complexType name=""SyncFolderHierarchyCreateOrUpdateType"">
  <xs:choice>
    <xs:element name=""Folder""
      type=""t:FolderType""
     />
    <xs:element name=""CalendarFolder""
      type=""t:CalendarFolderType""
     />
    <xs:element name=""ContactsFolder""
      type=""t:ContactsFolderType""
     />
    <xs:element name=""SearchFolder""
      type=""t:SearchFolderType""
     />
    <xs:element name=""TasksFolder""
      type=""t:TasksFolderType""
     />
  </xs:choice>
</xs:complexType>
");
                    }

                    // If the change is deleted, verify MS-OXWSSYNC_R86 and requirements in delete operation.
                    if (syncFoldHierarchyResponseMessage.Changes.ItemsElementName[i] == ItemsChoiceType.Delete)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSSYNC_R86");

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R86
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            86,
                            @"[In t:SyncFolderHierarchyChangesType Complex Type] The type of Delete is  t:SyncFolderHierarchyDeleteType (section 3.1.4.1.3.3).");

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

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R450
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            450,
                            @"[In t:SyncFolderHierarchyDeleteType Complex Type] The SyncFolderHierarchyDeleteType complex type specifies a folder to delete from the client data store. 
                        <xs:complexType name=""SyncFolderHierarchyDeleteType"">
                          <xs:sequence>
                            <xs:element name=""FolderId""
                              type=""t:FolderIdType""
                             />
                          </xs:sequence>
                        </xs:complexType>");

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

                        // Verify MS-OXWSCDATA requirement: MS-OXWSCDATA_R1165
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            "MS-OXWSCDATA",
                            1165,
                            @"[In t:FolderIdType Complex Type] The type [FolderIdType] is defined as follow:
                        <xs:complexType name=""FolderIdType"">
                          <xs:complexContent>
                            <xs:extension
                              base=""t:BaseFolderIdType""
                            >
                              <xs:attribute name=""Id""
                                type=""xs:string""
                                use=""required""
                               />
                              <xs:attribute name=""ChangeKey""
                                type=""xs:string""
                                use=""optional""
                               />
                            </xs:extension>
                          </xs:complexContent>
                        </xs:complexType>");

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

                        // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R116
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            116,
                            @"[In t:SyncFolderHierarchyDeleteType Complex Type] The type of FolderId is t:FolderIdType ([MS-OXWSCDATA] section 2.2.4.36).");
                    }
                }
            }

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R457
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                457,
                @"[In SyncFolderHierarchy] The following is the WSDL port type specification of the SyncFolderHierarchy operation.
                <wsdl:operation name=""SyncFolderHierarchy"">
                     <wsdl:input message=""tns:SyncFolderHierarchySoapIn"" />
                     <wsdl:output message=""tns:SyncFolderHierarchySoapOut"" />
                </wsdl:operation>");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R459
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                459,
                @"[In SyncFolderHierarchy] The following is the WSDL binding specification of the SyncFolderHierarchy operation.
                    <wsdl:operation name=""SyncFolderHierarchy"">
                       <soap:operation soapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/SyncFolderHierarchy"" />
                       <wsdl:input>
                          <soap:header message=""tns:SyncFolderHierarchySoapIn"" part=""Impersonation"" use=""literal""></soap:header>
                          <soap:header message=""tns:SyncFolderHierarchySoapIn"" part=""MailboxCulture"" use=""literal""/>
                          <soap:header message=""tns:SyncFolderHierarchySoapIn"" part=""RequestVersion"" use=""literal""/>
                          <soap:body parts=""request"" use=""literal"" />
                       </wsdl:input>
                       <wsdl:output>
                          <soap:body parts=""SyncFolderHierarchyResult"" use=""literal"" />
                          <soap:header message=""tns:SyncFolderHierarchySoapOut"" part=""ServerVersion"" use=""literal""/>
                       </wsdl:output>
                    </wsdl:operation>");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R460
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                460,
                @"[In SyncFolderHierarchy] The SyncFolderHierarchy operation MUST return one SyncFolderHierarchyResponseMessage element in the ResponseMessages element of the SyncFolderHierarchyResponse element (section 3.1.4.1.2.2).");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R463
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                463,
                @"[In m:SyncFolderHierarchyResponseType Complex Type] [The schema of ""SyncFolderHierarchyResponseType"" is:]
                <xs:complexType name=""SyncFolderHierarchyResponseType"">
                    <xs:complexContent>
                    <xs:extension
                        base=""m:BaseResponseMessageType""
                        />
                    </xs:complexContent>
                </xs:complexType>");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R465
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                465,
                @"[In SyncFolderHierarchyResponse Element] The SyncFolderHierarchyResponse element specifies the response message for a SyncFolderHierarchy operation (section 3.1.4.1).  <xs:element name=""SyncFolderHierarchyResponse""
                type=""m:SyncFolderHierarchyResponseType""
                />");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R299
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                299,
                @"[In tns:SyncFolderHierarchySoapOut] The SyncFolderHiearchySoapOut WSDL message specifies the server responses to a SyncFolderHierarchy operation request to return synchronization information.
                <wsdl:message name=""SyncFolderHierarchySoapOut"">
                <wsdl:part name=""SyncFolderHierarchyResult"" element=""tns:SyncFolderHierarchyResponse"" />
                <wsdl:part name=""ServerVersion"" element=""t:ServerVersionInfo""/>
                </wsdl:message>");

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R306
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                306,
                @"[In tns:SyncFolderHierarchySoapOut] The Element/Type of SyncFolderHierarchyResult is tns:SyncFolderHierarchyResponse (section 3.1.4.1.2.2).");

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

            // Verify requirement MS-OXWSSYNC_R307
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                307,
                @"[In tns:SyncFolderHierarchySoapOut] [The part name syncFolderHierarchyResult] specifies the SOAP body of the response to a SyncFolderHiearchy operation request.");

            if (this.exchangeServiceBinding.ServerVersionInfoValue != null)
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSSYNC_R308");

                // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R308
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    308,
                    @"[In tns:SyncFolderHierarchySoapOut] The Element/Type of ServerVersion is t:ServerVersionInfo ([MS-OXWSCDATA] section 2.2.3.12).");

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

                // Verify requirement MS-OXWSSYNC_R309
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    309,
                    @"[In tns:SyncFolderHierarchySoapOut] [The part name ServerVersion] specifies a SOAP header that identifies the server version for the response to a SyncFolderHiearchy operation request.");
            }

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

            // Verify MS-OXWSSYNC requirement: MS-OXWSSYNC_R238
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                238,
                @"[In SyncFolderHierarchy] The ResponseMessages element is specified as an element of the BaseResponseMessageType complex type ([MS-OXWSCDATA] section 2.2.4.18).");

            // Verify the requirements in MS-OXWSCDATA.
            this.VerifyRequirementOfOXWSCDATA(syncFoldHierarchyResponseMessage, isSchemaValidated);
        }
コード例 #4
0
        public void MSOXWSSYNC_S03_TC02_SyncFolderHierarchy_WithAllOptionalElements()
        {
            #region Step 1. Client invokes SyncFolderHierarchy operation to server to get initial syncState.
            // Add inbox folder and search folder into list
            this.FolderIdNameType.Add(DistinguishedFolderIdNameType.inbox);
            this.FolderIdNameType.Add(DistinguishedFolderIdNameType.searchfolders);

            // Get the initial syncState
            SyncFolderHierarchyResponseMessageType[] responseMessage = new SyncFolderHierarchyResponseMessageType[this.FolderIdNameType.Count];
            SyncFolderHierarchyResponseType[]        response        = new SyncFolderHierarchyResponseType[this.FolderIdNameType.Count];

            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                SyncFolderHierarchyType request = TestSuiteHelper.CreateSyncFolderHierarchyRequest(this.FolderIdNameType[i], DefaultShapeNamesType.Default, true, true);
                response[i]        = this.SYNCAdapter.SyncFolderHierarchy(request);
                responseMessage[i] = TestSuiteHelper.EnsureResponse <SyncFolderHierarchyResponseMessageType>(response[i]);
            }
            #endregion

            #region Step 2. Client invokes CreateSubFolder to create folders.
            // Generate the created folder name
            string firstLevelFolderName  = Common.GenerateResourceName(this.Site, "FirstLevelFolder");
            string secondLevelFolderName = Common.GenerateResourceName(this.Site, "SecondLevelFolder");

            // Create folders under inbox, calendar, contacts, tasks and search folder
            this.CreateMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                firstLevelFolderName,
                secondLevelFolderName,
                TestSuiteBase.SearchText);
            #endregion

            #region Step 3. Client invokes SyncFolderHierarchy operation to sync the operation result in Step 2.
            // Call SyncFolderHierarchy operation to sync the create folder operation result
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion

            #region Step 4. Client invokes FindAndUpdateFolderName to change the folder's name.
            // Generate a new folder name
            string newFolderName = Common.GenerateResourceName(this.Site, "NewFolderName");

            // Update the specific folder's name to a new one
            this.UpdateMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                firstLevelFolderName,
                secondLevelFolderName,
                newFolderName);
            #endregion

            #region  Step 5. Client invokes SyncFolderHierarchy operation with previous syncState to sync the operation result in Step 4.
            // Call SyncFolderHierarchy operation to sync the update folder operation result
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion

            #region Step 6. Client invokes FindAndDeleteSubFolder to delete the folder that created in step 2.
            // Delete the sub folder that created in step 2
            this.DeleteMultipleFolders(
                Common.GetConfigurationPropertyValue("User1Name", this.Site),
                Common.GetConfigurationPropertyValue("User1Password", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                this.FolderIdNameType,
                newFolderName);
            #endregion

            #region Step 7. Client invokes SyncFolderHierarchy operation with previous syncState to sync the operation result of Step 6.
            // Call SyncFolderHierarchy operation to sync the delete folder operation result
            for (int i = 0; i < this.FolderIdNameType.Count; i++)
            {
                responseMessage[i] = this.GetSyncFolderHierarchyResponseMessage(responseMessage[i], this.FolderIdNameType[i]);
            }
            #endregion
        }