Microsoft.Protocols.TestSuites.MS_OXNSPI.S05_NegativeBehavior.MSOXNSPI_S05_TC23_CompareMIdsFailedWithGeneralFailure C# (CSharp) Method

MSOXNSPI_S05_TC23_CompareMIdsFailedWithGeneralFailure() private method

        public void MSOXNSPI_S05_TC23_CompareMIdsFailedWithGeneralFailure()
        {
            this.CheckProductSupported();
            this.CheckMAPIHTTPTransportSupported();

            #region Call NspiBind to initiate a session between the client and the server.
            uint flags = 0;
            STAT stat = new STAT();
            stat.InitiateStat();
            FlatUID_r guid = new FlatUID_r
            {
                Ab = new byte[16]
            };
            FlatUID_r? serverGuid = guid;

            this.Result = this.ProtocolAdatper.NspiBind(flags, stat, ref serverGuid);
            Site.Assert.AreEqual<ErrorCodeValue>(ErrorCodeValue.Success, this.Result, "NspiBind should return Success!");
            #endregion

            #region Call NspiCompareMIds with invalid input parameters MId1 and MId2, so that the address book objects specified by invalid MId1 and MId2 cannot be located.
            uint reservedOfCompareMIds = 0;
            uint mid1 = 0x0; // A MID whose value is less than 0x10 is not used to specify any Address Book object.
            uint mid2 = 0x1;
            int results;

            this.Result = this.ProtocolAdatper.NspiCompareMIds(reservedOfCompareMIds, stat, mid1, mid2, out results, false);

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

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R1234
            Site.CaptureRequirementIfAreEqual<ErrorCodeValue>(
                ErrorCodeValue.GeneralFailure,
                this.Result,
                1234,
                @"[In NspiCompareMIds] [Server Processing Rules: Upon receiving message NspiCompareMIds, the server MUST process the data from the message subject to the following constraints:] [Constraint 5] If the server is unable to locate the objects specified by the input parameters MId1 or MId2 in the table specified by the ContainerID field of the input parameter pStat, the server MUST return the return value ""GeneralFailure"".");

            #endregion
            #endregion

            #region Call NspiUnbind to destroy the session between the client and the server.
            uint returnValue = this.ProtocolAdatper.NspiUnbind(0);
            Site.Assert.AreEqual<uint>(1, returnValue, "NspiUnbind method should return 1 (Success).");
            #endregion
        }
S05_NegativeBehavior