public void MSOXCRPC_S01_TC14_TestErrorCodeOfEcDoConnect()
{
this.CheckTransport();
#region Tests error code ecAccessDenied
if (Common.IsRequirementEnabled(4887, this.Site))
{
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
string.Empty,
ref this.pcbAuxOut,
this.rgwClientVersion,
out this.rgwBestVersion,
out this.picxr);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R4887");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R4887
Site.CaptureRequirementIfAreEqual<uint>(
0x80070005,
this.returnValue,
4887,
@"[In Appendix B: Product Behavior] Implementation does return ecAccessDenied (0x80070005) if the szUserDN parameter is empty. (<15> Section 3.1.4.1: Exchange 2010 and above follow this behavior.)");
}
ushort[] rgwServerVersion;
if (Common.IsRequirementEnabled(1437, this.Site))
{
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
uint flagsValue = 0x00000000;
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
string.Empty,
ref this.pcbAuxOut,
this.rgwClientVersion,
out rgwServerVersion,
out this.rgwBestVersion,
out this.picxr,
flagsValue);
// Add the debug information
this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R1437");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R1437
this.Site.CaptureRequirementIfAreEqual<uint>(
0x00000000,
this.returnValue,
1437,
@"[In Appendix B: Product Behavior] [<15> Section 3.1.4.1] Implementation returns ecNone (0x00000000) if the szUserDN parameter is empty. (Microsoft Exchange Server 2007 follows this behavior.)");
}
#endregion
#region Tests error code ecUnknownUser
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
"UserDN",
ref this.pcbAuxOut,
this.rgwClientVersion,
out this.rgwBestVersion,
out this.picxr);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R600");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R600
Site.CaptureRequirementIfAreEqual<uint>(
0x000003EB,
this.returnValue,
600,
@"[In EcDoConnectEx Method (Opnum 10)] [Return Values] [ecUnknownUser (0x000003EB)] The server does not recognize the szUserDN parameter as a valid enabled mailbox.");
#endregion
#region Tests error code ecVersionMismatch
ushort[] mismatchClientVersion = new ushort[] { 0, 0, 0 };
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
this.userDN,
ref this.pcbAuxOut,
mismatchClientVersion,
out this.rgwBestVersion,
out this.picxr);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R606");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R606
Site.CaptureRequirementIfAreEqual<uint>(
0x80040110,
this.returnValue,
606,
@"[In EcDoConnectEx Method (Opnum 10)] [Return Values] [ecVersionMismatch (0x80040110)] The client and server versions are not compatible.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R608");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R608
Site.CaptureRequirementIfAreEqual<uint>(
0x80040110,
this.returnValue,
608,
@"[In EcDoConnectEx Method (Opnum 10)] [Return Values] [ecVersionMismatch (0x80040110)] The client protocol version is earlier than that required by the server.");
#endregion
#region Tests error code ecClientVerDisallowed.
List<AUX_SERVER_TOPOLOGY_STRUCTURE> rgbAuxOutValue;
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
this.rgbAuxIn,
this.userDN,
ref this.pcbAuxOut,
mismatchClientVersion,
out rgwServerVersion,
out this.rgwBestVersion,
out this.picxr,
0x00008000,
out rgbAuxOutValue);
// Add the debug information
this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCRPC_R4886");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R4886
this.Site.CaptureRequirementIfAreNotEqual<uint>(
0x000004DF,
this.returnValue,
4886,
@"[In Client Versions] [Client version ""12.00.0000.000""] For client versions earlier than 12.00.0000.000, the server MUST not fail the EcDoConnectEx method call with ecClientVerDisallowed if the EcDoConnectEx method parameter flag 0x00008000 is passed in the ulFlags parameter.");
#endregion
}