public void MSASPROV_S03_TC03_VerifyProvisionStatus2()
{
#region Create a Provision request with syntax error.
ProvisionRequest provisionRequest = Common.CreateProvisionRequest(null, new Request.ProvisionPolicies(), null);
Request.ProvisionPoliciesPolicy policy = new Request.ProvisionPoliciesPolicy
{
PolicyType = "MS-EAS-Provisioning-WBXML"
};
// The format in which the policy settings are to be provided to the client device.
if (Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site) == "14.1" ||
Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site) == "16.0")
{
// Configure the DeviceInformation.
Request.DeviceInformation deviceInfomation = new Request.DeviceInformation();
Request.DeviceInformationSet deviceInformationSet = new Request.DeviceInformationSet
{
Model = "ASPROVTest"
};
deviceInfomation.Set = deviceInformationSet;
provisionRequest.RequestData.DeviceInformation = deviceInfomation;
}
provisionRequest.RequestData.Policies.Policy = policy;
string requestBody = provisionRequest.GetRequestDataSerializedXML();
requestBody = requestBody.Replace(@"<Policies>", string.Empty);
requestBody = requestBody.Replace(@"</Policies>", string.Empty);
#endregion
#region Call Provision command and get the Status of response.
ProvisionResponse provisionResponse = this.PROVAdapter.SendProvisionStringRequest(requestBody);
byte provisionStatus = provisionResponse.ResponseData.Status;
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R395");
// Verify MS-ASPROV requirement: MS-ASPROV_R395
// The Status of Provision element is 2, so this requirement can be captured.
Site.CaptureRequirementIfAreEqual<byte>(
2,
provisionStatus,
395,
@"[In Status (Provision)] Value 2 means Protocol error.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R679");
// Verify MS-ASPROV requirement: MS-ASPROV_R679
// The Status of Provision element is 2, so this requirement can be captured.
Site.CaptureRequirementIfAreEqual<byte>(
2,
provisionStatus,
679,
@"[In Provision Command Errors] [The meaning of status value] 2 [is] Protocol error.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R450");
// Verify MS-ASPROV requirement: MS-ASPROV_R450
// The Status of Provision element is 2, so this requirement can be captured.
Site.CaptureRequirementIfAreEqual<byte>(
2,
provisionStatus,
450,
@"[In Provision Command Errors] [The cause of status value 2 is] Syntax error in the Provision command request.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R497");
// Verify MS-ASPROV requirement: MS-ASPROV_R497
// The Status of Provision element is 2, so this requirement can be captured.
Site.CaptureRequirementIfAreEqual<byte>(
2,
provisionStatus,
497,
@"[In Provision Command Errors] [When the scope is Global], [the cause of status value 2 is] Syntax error in the Provision command request.");
if (Common.IsRequirementEnabled(697, this.Site))
{
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASPROV_R697");
// Verify MS-ASPROV requirement: MS-ASPROV_R697
// Status 2 is returned when there is syntax error in the Provision command request, so this requirement can be captured.
Site.CaptureRequirement(
697,
@"[In Appendix B: Product Behavior] If the level of compliance does not meet the server's requirements, the implementation does return an appropriate value in the Status (section 2.2.2.53.2) element. (Exchange 2007 and above follow this behavior.)");
}
#endregion
}