Microsoft.Protocols.TestSuites.MS_OXCFOLD.S03_FolderInformation.MSOXCFOLD_S03_TC12_RopGetSearchCriteriaFailure C# (CSharp) Method

MSOXCFOLD_S03_TC12_RopGetSearchCriteriaFailure() private method

private MSOXCFOLD_S03_TC12_RopGetSearchCriteriaFailure ( ) : void
return void
        public void MSOXCFOLD_S03_TC12_RopGetSearchCriteriaFailure()
        {
            this.CheckWhetherSupportTransport();
            this.Adapter.DoConnect(ConnectionType.PrivateMailboxServer);
            this.GenericFolderInitialization();

            #region Step 1. The client calls RopGetSearchCriteria to retrieve the hierarchy table for the root folder which is a generic folder rather than a search folder.

            RopGetSearchCriteriaRequest getSearchCriteriaRequest = new RopGetSearchCriteriaRequest
            {
                RopId = (byte)RopId.RopGetSearchCriteria,
                LogonId = Constants.CommonLogonId,
                InputHandleIndex = Constants.CommonInputHandleIndex,
                UseUnicode = 0x00,
                IncludeRestriction = 0x00,
                IncludeFolders = 0xFF
            };
            RopGetSearchCriteriaResponse getSearchCriteriaResponse = this.Adapter.GetSearchCriteria(getSearchCriteriaRequest, this.RootFolderHandle, ref this.responseHandles);

            #region Verify the requirements: MS-OXCFOLD_R579, MS-OXCFOLD_R580.

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

            // Verify MS-OXCFOLD requirement: MS-OXCFOLD_R579
            Site.CaptureRequirementIfAreEqual<uint>(
                0x00000461,
                getSearchCriteriaResponse.ReturnValue,
                579,
                @"[In Processing a RopGetSearchCriteria ROP Request]The value of error code ecNotSearchFolder is 0x00000461.");

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

            // Verify MS-OXCFOLD requirement: MS-OXCFOLD_R580
            Site.CaptureRequirementIfAreEqual<uint>(
                0x00000461,
                getSearchCriteriaResponse.ReturnValue,
                580,
                @"[In Processing a RopGetSearchCriteria ROP Request] When the error code is ecNotSearchFolder, it indicates that the object is not a search folder.");

            #endregion

            #endregion

            #region Step 2. The client calls RopGetSearchCriteria to retrieve the hierarchy table using a logon object handle.

            // Use logon object handle in which case is purposed to get error code ecNotSupported [0x80040102].  
            getSearchCriteriaResponse = this.Adapter.GetSearchCriteria(getSearchCriteriaRequest, this.LogonHandle, ref this.responseHandles);

            #region Verify MS-OXCFOLD_R581, MS-OXCFOLD_R577

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

            // Verify MS-OXCFOLD requirement: MS-OXCFOLD_R581
            Site.CaptureRequirementIfAreEqual<uint>(
                0x80040102,
                getSearchCriteriaResponse.ReturnValue,
                581,
                @"[In Processing a RopGetSearchCriteria ROP Request]The value of error code ecNotSupported is 0x80040102.");

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

            // Verify MS-OXCFOLD requirement: MS-OXCFOLD_R582
            Site.CaptureRequirementIfAreEqual<uint>(
                0x80040102,
                getSearchCriteriaResponse.ReturnValue,
                582,
                @"[In Processing a RopGetSearchCriteria ROP Request] When the error code is ecNotSupported, it indicates that the object that this ROP [RopGetSearchCriteria ROP] was called on is not a Folder object.");

            #endregion

            #endregion
        }