List:Commits« Previous MessageNext Message »
From:rburnett Date:December 5 2006 8:15pm
Subject:Connector/NET commit: r477 - in trunk: . TestSuite
View as plain text  
Modified:
   trunk/Client.build
   trunk/TestSuite/BaseTest.cs
   trunk/TestSuite/MySql.Data.Tests.2005.csproj
Log:
fixed warning in test suite about AppSettings under .NET 2.0
Also, attempt to remove error about ${ncover.executable} not defined.

Modified: trunk/Client.build
===================================================================
--- trunk/Client.build	2006-12-05 18:52:03 UTC (rev 476)
+++ trunk/Client.build	2006-12-05 19:15:20 UTC (rev 477)
@@ -177,14 +177,14 @@
 		<copy overwrite="true" file="testsuite/configs/${config}"
tofile="mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/>
 		
 		<property name="nunit-exe" value="${nunit.dir}/bin/nunit-console.exe"/>
-		<property name="nunit-exe" value="${nunit.dir}/mono/bin/nunit-console.exe"
if="${string::contains(framework, 'mono')}"/>
+<!--		<property name="nunit-exe" value="${nunit.dir}/mono/bin/nunit-console.exe"
if="${string::contains(framework, 'mono')}"/>-->
 
 		<exec unless="${doCoverage}" program="${nunit-exe}"
 		      commandline="/fixture=MySql.Data.MySqlClient.Tests.AsyncTests
/exclude=${excludes} mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll"
 		      failonerror="true"/>
-		<exec if="${doCoverage}" program="${ncover.executable}"
+<!--		<exec if="${doCoverage}" program="${ncover.executable}"
 		      commandline="/c &quot;${nunit-exe}&quot;
&quot;mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll
/exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml&quot;
/a MySql.Data /o results/ncover-${framework}-${config}.xml"
-		      failonerror="true"/>
+		      failonerror="true"/>-->
 	</target>
 
 	<!-- Run fxcop on the current build -->	

Modified: trunk/TestSuite/BaseTest.cs
===================================================================
--- trunk/TestSuite/BaseTest.cs	2006-12-05 18:52:03 UTC (rev 476)
+++ trunk/TestSuite/BaseTest.cs	2006-12-05 19:15:20 UTC (rev 477)
@@ -49,18 +49,25 @@
             database = "test";
             port = 3306;
 
-            object o = ConfigurationSettings.AppSettings["port"];
-            if (o != null)
-                port = Int32.Parse((string)o);
-            o = ConfigurationSettings.AppSettings["database"];
-            if (o != null)
-                database = (string)o;
-            o = ConfigurationSettings.AppSettings["userid"];
-            if (o != null)
-                user = (string)o;
-            o = ConfigurationSettings.AppSettings["password"];
-            if (o != null)
-                password = (string)o;
+#if NET20
+            string strPort = ConfigurationManager.AppSettings["port"];
+            string strDatabase = ConfigurationManager.AppSettings["database"];
+            string strUserId = ConfigurationManager.AppSettings["userid"];
+            string strPassword = ConfigurationManager.AppSettings["password"];
+#else
+            string strPort = ConfigurationSettings.AppSettings["port"];
+            string strDatabase = ConfigurationSettings.AppSettings["database"];
+            string strUserId = ConfigurationSettings.AppSettings["userid"];
+            string strPassword = ConfigurationSettings.AppSettings["password"];
+#endif
+            if (strPort != null)
+                port = Int32.Parse(strPort);
+            if (strDatabase != null)
+                database = strDatabase;
+            if (strUserId != null)
+                user = strUserId;
+            if (strPassword != null)
+                password = strPassword;
         }
 
 		protected virtual string GetConnectionInfo()

Modified: trunk/TestSuite/MySql.Data.Tests.2005.csproj
===================================================================
--- trunk/TestSuite/MySql.Data.Tests.2005.csproj	2006-12-05 18:52:03 UTC (rev 476)
+++ trunk/TestSuite/MySql.Data.Tests.2005.csproj	2006-12-05 19:15:20 UTC (rev 477)
@@ -33,6 +33,7 @@
   <ItemGroup>
     <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
     <Reference Include="System" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Transactions" />
     <Reference Include="System.Xml" />

Thread
Connector/NET commit: r477 - in trunk: . TestSuiterburnett5 Dec