Microsoft.Protocols.TestSuites.MS_ASPROV.S03_ProvisionNegative.MSASPROV_S03_TC06_VerifyPolicyStatus145 C# (CSharp) Method

MSASPROV_S03_TC06_VerifyPolicyStatus145() private method

private MSASPROV_S03_TC06_VerifyPolicyStatus145 ( ) : void
return void
        public void MSASPROV_S03_TC06_VerifyPolicyStatus145()
        {
            #region Download the policy settings.
            // Download the policy settings.
            ProvisionResponse provisionResponse = this.CallProvisionCommand(string.Empty, "MS-EAS-Provisioning-WBXML", "1");
            string temporaryPolicyKey = provisionResponse.ResponseData.Policies.Policy.PolicyKey;
            #endregion

            #region Acknowledge the policy settings.

            if ("12.1" != Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site))
            {
                // Acknowledge the policy settings.
                provisionResponse = this.CallProvisionCommand(temporaryPolicyKey, "MS-EAS-Provisioning-WBXML", "4");

                this.Site.CaptureRequirementIfAreEqual<byte>(
                    145,
                    provisionResponse.ResponseData.Status,
                    686,
                    @"[In Provision Command Errors] [The meaning of status value] 145 [is] The client is externally managed.");

                this.Site.CaptureRequirementIfAreEqual<byte>(
                    145,
                    provisionResponse.ResponseData.Status,
                    461,
                    @"[In Provision Command Errors] [The cause of status value 145 is] The client returned a value of 4 in the Status child element of the Policy element in a request to the server to acknowledge a policy.");

                this.Site.CaptureRequirementIfAreEqual<byte>(
                    145,
                    provisionResponse.ResponseData.Status,
                    687,
                    @"[In Provision Command Errors] [The cause of status value 145 is] The server is configured to not allow externally managed clients.");
            }
            #endregion
        }