List:Commits« Previous MessageNext Message »
From:rburnett Date:March 7 2007 4:10pm
Subject:Connector/NET commit: r631 - branches/5.0/TestSuite
View as plain text  
Modified:
   branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj
   branches/5.0/TestSuite/ParameterTests.cs
Log:
Added test case for adding a parameter that was previously removed.  This bug had been already fixed but it's good to have the test case to make sure it doesn't come back.

Modified: branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj
===================================================================
--- branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj	2007-03-06 03:29:04 UTC (rev 630)
+++ branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj	2007-03-07 16:10:06 UTC (rev 631)
@@ -31,10 +31,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files (x86)\Mono-1.2.3.1\lib\mono\1.0\nunit.framework.dll</HintPath>
-    </Reference>
+    <Reference Include="nunit.framework, Version=2.2.9.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Data" />

Modified: branches/5.0/TestSuite/ParameterTests.cs
===================================================================
--- branches/5.0/TestSuite/ParameterTests.cs	2007-03-06 03:29:04 UTC (rev 630)
+++ branches/5.0/TestSuite/ParameterTests.cs	2007-03-07 16:10:06 UTC (rev 631)
@@ -459,5 +459,24 @@
             {
             }
         }
+
+        /// <summary>
+        /// Bug #26904 MySqlParameterCollection fails to add MySqlParameter that previously removed 
+        /// </summary>
+        [Test]
+        public void AddingParameterPreviouslyRemoved()
+        {
+            MySqlCommand cmd = new
+            MySqlCommand("Insert into sometable(s1, s2) values(?p1, ?p2)");
+
+            MySqlParameter param1 = cmd.CreateParameter();
+            param1.ParameterName = "?p1";
+            param1.DbType = DbType.String;
+            param1.Value = "Ali Gel";
+
+            cmd.Parameters.Add(param1);
+            cmd.Parameters.RemoveAt(0);
+            cmd.Parameters.Add(param1);
+        }
     }
 }

Thread
Connector/NET commit: r631 - branches/5.0/TestSuiterburnett7 Mar