Microsoft.Protocols.TestSuites.MS_OXCNOTIF.S01_ReceivePendingNotifications.MSOXCNOTIF_S01_TC04_VerifyPushNotificationForIPv6 C# (CSharp) Method

MSOXCNOTIF_S01_TC04_VerifyPushNotificationForIPv6() private method

private MSOXCNOTIF_S01_TC04_VerifyPushNotificationForIPv6 ( ) : void
return void
        public void MSOXCNOTIF_S01_TC04_VerifyPushNotificationForIPv6()
        {
            this.CheckWhetherSupportMAPIHTTP();
            this.NotificationInitialize();
            Site.Assume.IsTrue(Common.IsRequirementEnabled(313, this.Site), "This case runs only under Exchange 2007, since Exchange 2010 and Exchange 2013 do not support EcRRegisterPushNotification.");

            #region Variables
            int port = this.GetValidUDPPort();
            #endregion

            #region Subscribe NewMail event
            this.CNOTIFAdapter.RegisterNotification(NotificationType.NewMail);
            #endregion

            #region Call EcRRegisterPushNotification with the valid IPV6 callback address
            uint resultEcRRegister = this.CNOTIFAdapter.EcRRegisterPushNotification(AddressFamily.AF_INET6, port, S01_ReceivePendingNotifications.OpaqueContextData);
            #endregion

            #region Verify that the server supports at a munimum the AF_INET6 address type for IPv6 support.
            if (Common.IsRequirementEnabled(323, this.Site))
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCNOTIF_R323: the return value of EcRRegisterPushNotification is {0}", resultEcRRegister);

                // Verify MS-OXCNOTIF requirement: MS-OXCNOTIF_R323
                // Use AF_INET6 address type to register push notification, if a successful response is returned means implementation support this address type.
                this.Site.CaptureRequirementIfAreEqual<uint>(
                    0x00,
                    resultEcRRegister,
                    323,
                    @"[In Appendix A: Product Behavior] Implementation does support at a minimum the AF_INET6 address type for IPv6 support. (Exchange 2007 follows this behavior.)");
            }
            #endregion
        }