Microsoft.Protocols.TestSuites.MS_OXCMAPIHTTP.S02_RequestTypesForAddressBookServerEndpoint.MSOXCMAPIHTTP_S02_TC02_GetMailboxUrl C# (CSharp) Method

MSOXCMAPIHTTP_S02_TC02_GetMailboxUrl() private method

private MSOXCMAPIHTTP_S02_TC02_GetMailboxUrl ( ) : void
return void
        public void MSOXCMAPIHTTP_S02_TC02_GetMailboxUrl()
        {
            this.CheckMapiHttpIsSupported();

            #region Call Bind request type to established a session context with the address book server.
            this.Bind();
            #endregion

            #region Call the GetMailboxUrl request type to get the Uniform Resource Locator (URL) of the specified mailbox server endpoint.

            string serverDn = Common.GetConfigurationPropertyValue("ServerDN", this.Site);

            // The client MUST set this field to 0x00000000 and the server MUST ignore this field.
            uint flagsOfGetMailboxUrl = 0x00000000;
            GetMailboxUrlRequestBody getMailboxUrlRequestBody = new MS_OXCMAPIHTTP.GetMailboxUrlRequestBody();
            getMailboxUrlRequestBody.Flags = flagsOfGetMailboxUrl;
            getMailboxUrlRequestBody.ServerDn = serverDn;
            getMailboxUrlRequestBody.AuxiliaryBuffer = new byte[] { };
            getMailboxUrlRequestBody.AuxiliaryBufferSize = 0;

            GetMailboxUrlResponseBody getMailboxUrlResponseBody = this.Adapter.GetMailboxUrl(getMailboxUrlRequestBody);

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1089
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                getMailboxUrlResponseBody.ErrorCode,
                1089,
                @"[In GetMailboxUrl Request Type] The GetMailboxUrl request type is used by the client to get the Uniform Resource Locator (URL) of the specified mailbox server endpoint (4).");
            #endregion

            #region Call the Unbind request type to destroy the session context.
            this.Unbind();
            #endregion
        }