Several properties on OracleCommand are not taken when cloning an OracleCommand. While CommandText and CommandType seem well, PassParametersByName as well as CommandTimeout remain on their default values
Code: Select all
OracleCommand templateCommand = new OracleCommand();
templateCommand.CommandText = "ASD";
templateCommand.CommandType = CommandType.StoredProcedure;
templateCommand.CommandTimeout = 50;
templateCommand.PassParametersByName = true;
OracleCommand clonedCommand = (OracleCommand)templateCommand.Clone();
Assert.AreEqual(templateCommand.CommandText, clonedCommand.CommandText);
Assert.AreEqual(templateCommand.CommandType, clonedCommand.CommandType);
Assert.AreEqual(templateCommand.PassParametersByName, clonedCommand.PassParametersByName);
Assert.AreEqual(templateCommand.CommandTimeout, clonedCommand.CommandTimeout);