public void MSOXCRPC_S01_TC19_TestUlFlagsForEcDoConnectEx()
{
this.CheckTransport();
uint flagsValue;
#region Creates an RPC connection to the remote server use a user that not is administrator.
string commonUserName = Common.GetConfigurationPropertyValue("NormalUserName", this.Site);
string commonPassword = Common.GetConfigurationPropertyValue("NormalUserPassword", this.Site);
this.oxcrpcAdapter.InitializeRPC(this.authenticationLevel, this.authenticationService, commonUserName, commonPassword);
#endregion
#region Call EcDoConnectEx method to establish a new Session Context with the server.
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
ushort[] rgwServerVersion;
flagsValue = 0x00000000;
string commonUserDN = Common.GetConfigurationPropertyValue("NormalUserEssdn", this.Site);
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
commonUserDN,
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_R489");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R489
this.Site.CaptureRequirementIfAreEqual<uint>(
TestSuiteBase.ResultSuccess,
this.returnValue,
489,
@"[In EcDoConnectEx Method (Opnum 10)] [ulFlags] [Value 0x00000000 means] requests connection without administrator privilege.");
#endregion
#region Call EcDoDisconnect to disconnect to server.
this.returnValue = this.oxcrpcAdapter.EcDoDisconnect(ref this.pcxh);
Site.Assert.AreEqual<uint>(0, this.returnValue, "Call EcDoDisconnect method should succeed with a valid CXH and '0' is expected to be returned. The returned value is {0}.", this.returnValue);
#endregion
#region Creates an RPC connection to the remote server use a user that is administrator.
this.oxcrpcAdapter.InitializeRPC(this.authenticationLevel, this.authenticationService, this.userName, this.password);
#endregion
#region Call EcDoConnectEx method to establish a new Session Context with the server.
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
flagsValue = 0x00000001;
this.returnValue = this.oxcrpcAdapter.EcDoConnectEx(
ref this.pcxh,
TestSuiteBase.UlIcxrLinkForNoSessionLink,
ref this.pulTimeStamp,
null,
this.userDN,
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_R490");
// Verify MS-OXCRPC requirement: MS-OXCRPC_R490
this.Site.CaptureRequirementIfAreEqual<uint>(
TestSuiteBase.ResultSuccess,
this.returnValue,
490,
@"[In EcDoConnectEx Method (Opnum 10)] [ulFlags] [Value 0x00000001 means] Requests administrator behavior, which causes the server to check that the user has administrator privilege.");
#endregion
#region Call EcDoDisconnect to disconnect to server.
this.returnValue = this.oxcrpcAdapter.EcDoDisconnect(ref this.pcxh);
Site.Assert.AreEqual<uint>(0, this.returnValue, "Call EcDoDisconnect method should succeed with a valid CXH and '0' is expected to be returned. The returned value is {0}.", this.returnValue);
#endregion
}
#endregion