Microsoft.Protocols.TestSuites.MS_OXCMAPIHTTP.S01_RequestTypesForMailboxServerEndpoint.MSOXCMAPIHTTP_S01_TC06_PINGRequestType C# (CSharp) Method

MSOXCMAPIHTTP_S01_TC06_PINGRequestType() private method

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

            WebHeaderCollection headers = new WebHeaderCollection();
            MailboxResponseBodyBase responseBody;

            #region Send a valid Connect request type to establish a Session Context with the server.
            ConnectSuccessResponseBody connectResponse = this.ConnectToServer(out headers);
            Site.Assert.AreEqual<uint>(0, connectResponse.StatusCode, "The server should return a Status 0 in X-ResponseCode header if client connect to server succeeded.");
           #endregion

            #region Send a PING request to Mailbox server endpoint.
            List<string> metatagsFromMailbox = new List<string>();
            uint responseCode = this.Adapter.PING(ServerEndpoint.MailboxServerEndpoint, out metatagsFromMailbox, out headers);

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1124");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1124
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                responseCode,
                1124,
                @"[In PING Request Type] The PING request type allows a client to determine whether a server's endpoint (4) is reachable and operational.");
            #endregion

            #region Send a Disconnect request type request to destroy the Session Context.
            this.Adapter.Disconnect(out responseBody);
            #endregion
        }