浏览代码

2006-12-20 Nagappan A <[email protected]>

	* OdbcDataReaderTest.cs, OdbcParameterCollectionTest.cs,
	  OdbcConnectionStringBuilderTest.cs, OdbcInfoMessageEventArgsTest.cs,
	  OdbcMetaDataCollectionNamesTest.cs, OdbcMetaDataColumnNamesTest.cs:
	  Reverted the changes.


svn path=/trunk/mcs/; revision=73244
Nagappan Alagappan 19 年之前
父节点
当前提交
fe6e50c577

+ 0 - 32
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/ChangeLog

@@ -1,35 +1,3 @@
-2007-02-02  Amit Biswas <[email protected]>
-
-	* OdbcDataReaderTest.cs (GetDataTypeNameTest)
-	(GetDataTypeNameIndexOutOfRangeExceptionTest, GetOrdinalTest)
-	(GetOrdinalTest, GetFieldTypeTest, GetNameTest)
-	(GetFieldTypeIndexOutOfRangeExceptionTest)
-	(GetNameIndexOutOfRangeExceptionTest): Added new tests
-	
-	* OdbcInfoMessageEventArgsTest.cs: Created new test case file	
-	Added test ToStringTest()	
-	
-	* OdbcMetaDataCollectionNamesTest.cs: Created new test case file	
-	Added test EqualsTest()
-	
-	* OdbcParameterCollectionTest.cs (InsertTest, AddRangeTest)
-	(ContainsTest, InsertArgumentGreaterThanCountTest, CopyToTest)
-	(InsertNegetiveArgumentTest, CopyToArgumentExceptionTest)
-	(AddRangeParameterAlreadyContainedTest, CopyToLowerBoundCheckTest)
-	(AddRangeArgumentNullExceptionTest, AddRangeMultiDimensionalArrayTest)
-	(CopyToMultiDimensionalArrayTest): Added new tests.
-
-2007-02-02  Nidhi Rawal  <[email protected]>
-	
-	* OdbcConnectionStringBuilderTest.cs: Created test cases for all
-	the methods that are implemented.
-
-	* OdbcMetaDataColumnNamesTest.cs: Implemented test cases for this
-	class.
-
-	* OdbcParameterCollectionTest.cs (IndexOfTest): Implemented test
-	case for the method.
-
 2006-12-20  Nagappan A  <[email protected]>
 
 	* OdbcCommandBuilderTest.cs (DefaultPropertiesTest): Removed

+ 0 - 126
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs

@@ -1,126 +0,0 @@
-// OdbcConnectionStringBuilderTest.cs - NUnit Test Cases for testing the
-// OdbcConnectionStringBuilder Class.
-//
-// Authors:
-//      Nidhi Rawal ([email protected])
-// 
-// Copyright (c) 2007 Novell Inc., and the individuals listed on the
-// ChangeLog entries.
-//
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use, copy,
-// modify, merge, publish, distribute, sublicense, and/or sell copies
-// of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-using System;
-using System.Data;
-using System.Data.Common;
-using System.Data.Odbc;
-using Mono.Data;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data
-{
-	[TestFixture]
-	[Category ("odbc")]
-	public class OdbcConnectionStringBuilderTest
-	{
-		[Test]
-		public void ClearTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			string temp = "";
-
-			builder ["Dbq"] = "C:\\Data.xls";
-			builder ["DriverID"] = "790";
-			builder ["DefaultDir"] = "C:\\";
-
-			foreach (string key in builder.Keys)
-				temp += key + " = " + builder [key].ToString () + "  ";
-			Assert.AreEqual ("Dbq = C:\\Data.xls  DriverID = 790  DefaultDir = C:\\  ", temp, "#1 All the keys and their values before clearing");
-
-			builder.Clear ();
-			temp = "";
-
-			foreach (string key in builder.Keys)
-				temp += key + " = " + builder [key].ToString () + "\n";
-			Assert.AreEqual ("", temp, "#2 All the keys and their values after clearing");
-		}
-
-		[Test]
-		public void ContainsKeyTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			builder ["SourceType"] = "DBC";
-			Assert.AreEqual (true, builder.ContainsKey ("SourceType"), "#1 Returns true for the key explicitly added");
-			Assert.AreEqual (false, builder.ContainsKey ("DSN"), "#2 Returns false for the key not explicitly added");
-			Assert.AreEqual (false, builder.ContainsKey ("xyz"), "#3 Returns false for any invalid string");
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentNullException))]
-		public void ContainsKeyNullArgumentTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			builder ["SourceType"] = "DBC";
-			builder.ContainsKey (null);
-		}
-
-		[Test]
-		public void RemoveTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			builder ["DriverID"] = "790";
-			builder ["DefaultDir"] = "C:\\";
-
-			Assert.AreEqual (true, builder.Remove ("DriverID"), "#1 Removes and returns true for the key explicitly added");
-			Assert.AreEqual (false, builder.Remove ("userid"), "#2 Unable to find key, returns false");
-			Assert.AreEqual (false, builder.Remove ("DriverID"), "#3 Cannot find the key previously removed");
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentNullException))]
-		public void RemoveNullArgumentTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			builder.Remove (null);
-		}
-
-		[Test]
-		public void TryGetValueTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			object value = null;
-			builder ["DriverID"] = "790";
-			builder ["Server"] = "C:\\";
-			Assert.AreEqual (true, builder.TryGetValue ("DriverID", out value), "#1 Gets the value and returns true");
-			Assert.AreEqual (false, builder.TryGetValue ("SERVER", out value), "#2 Unable to find the key");
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentNullException))]
-		public void TryGetValueNullArgumentTest ()
-		{
-			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder ();
-			object value = null;
-			builder.TryGetValue (null, out value);
-		}
-	}
-}

+ 0 - 163
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs

@@ -92,168 +92,5 @@ namespace MonoTests.System.Data
 				conn.Close ();
 			}
 		}
-
-		[Test]
-		public void GetDataTypeNameTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				Assert.AreEqual ("integer", reader.GetDataTypeName (0), "#1 Column id");
-				Assert.AreEqual ("varchar", reader.GetDataTypeName (2), "#2 Column lname");
-				Assert.AreEqual ("datetime", reader.GetDataTypeName (4), "#3 Column doj");
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (IndexOutOfRangeException))]
-		public void GetDataTypeNameIndexOutOfRangeExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				string tmp = reader.GetDataTypeName (6);
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		public void GetOrdinalTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				Assert.AreEqual (0, reader.GetOrdinal ("id"), "#1 First column = id");
-				Assert.AreEqual (1, reader.GetOrdinal ("fname"), "#2 Second column = fname");
-				Assert.AreEqual (2, reader.GetOrdinal ("lname"), "#3 Third column = lname");
-				Assert.AreEqual (3, reader.GetOrdinal ("dob"), "#4 Fourth column = dob");
-				Assert.AreEqual (4, reader.GetOrdinal ("doj"), "#5 Fifth column = doj");
-				Assert.AreEqual (5, reader.GetOrdinal ("email"), "#6 Sixth column = email");
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (IndexOutOfRangeException))]
-		public void GetOrdinalIndexOutOfRangeExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				int ord = reader.GetOrdinal ("non_existing_column");
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		public void GetFieldTypeTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				Assert.AreEqual ("System.Int32", reader.GetFieldType (0).ToString (), "#1 Integer");
-				Assert.AreEqual ("System.String", reader.GetFieldType (2).ToString (), "#2 Varchar");
-				Assert.AreEqual ("System.DateTime", reader.GetFieldType (4).ToString (), "#3 DateTime");
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (IndexOutOfRangeException))]
-		public void GetFieldTypeIndexOutOfRangeExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				String tmp = reader.GetFieldType (6).ToString ();
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		public void GetNameTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				Assert.AreEqual ("id", reader.GetName (0), "#1 First column = id");
-				Assert.AreEqual ("fname", reader.GetName (1), "#2 Second column = fname");
-				Assert.AreEqual ("lname", reader.GetName (2), "#3 Third column = lname");
-				Assert.AreEqual ("dob", reader.GetName (3), "#4 Fourth column = dob");
-				Assert.AreEqual ("doj", reader.GetName (4), "#5 Fifth column = doj");
-				Assert.AreEqual ("email", reader.GetName (5), "#6 Sixth column = email");
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (IndexOutOfRangeException))]
-		public void GetNameIndexOutOfRangeExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			OdbcDataReader reader;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				IDbCommand cmd = conn.CreateCommand ();
-				cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
-				reader = OdbcCmd.ExecuteReader ();
-				String tmp = reader.reader.GetName (6);
-			} finally {
-				if (reader != null)
-					reader.Close ();
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
 	}
 }

+ 0 - 52
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcInfoMessageEventArgsTest.cs

@@ -1,52 +0,0 @@
-// OdbcInfoMessageEventArgsTest.cs - NUnit Test Cases for testing the
-// OdbcInfoMessageEventArgs Test.
-//
-// Authors:
-//      Amit Biswas ([email protected])
-// 
-// Copyright (c) 2004 Novell Inc., and the individuals listed on the
-// ChangeLog entries.
-//
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use, copy,
-// modify, merge, publish, distribute, sublicense, and/or sell copies
-// of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-using System;
-using System.Data;
-using System.Data.Common;
-using System.Data.Odbc;
-using Mono.Data;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data
-{
-    [TestFixture]
-    [Category("odbc")]
-    public class OdbcInfoMessageEventArgsTest
-    {
-        [Test]
-        public void ToStringTest()
-        {
-            OdbcInfoMessageEventArgs e = new OdbcInfoMessageEventArgs();
-            Assert.AreEqual("System.Data.Odbc.OdbcInfoMessageEventArgs", e.ToString(), "#1 e.ToString()");
-        }
-    }
-}

+ 0 - 72
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs

@@ -1,72 +0,0 @@
-// OdbcMetaDataCollectionNamesTest.cs - NUnit Test Cases for testing the
-// OdbcMetaDataCollectionNames Test.
-//
-// Authors:
-//      Amit Biswas ([email protected])
-// 
-// Copyright (c) 2004 Novell Inc., and the individuals listed on the
-// ChangeLog entries.
-//
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use, copy,
-// modify, merge, publish, distribute, sublicense, and/or sell copies
-// of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-using System;
-using System.Data;
-using System.Data.Common;
-using System.Data.Odbc;
-using Mono.Data;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data
-{
-    [TestFixture]
-    [Category("odbc")]
-    public class OdbcMetaDataCollectionNamesTest
-    {
-        [Test]
-        public void EqualsTest()
-        {
-            object TestObj1;
-            object TestObj2;
-
-            TestObj1 = "Bangalore";
-            TestObj2 = "Bangalore";
-            Assert.AreEqual(true, OdbcMetaDataCollectionNames.Equals(TestObj1, TestObj2), "#1 Objects with same value");
-
-            TestObj1 = "Bangalore";
-            TestObj2 = "Mumbai";
-            Assert.AreEqual(false, OdbcMetaDataCollectionNames.Equals(TestObj1, TestObj2), "#2 Objects with different value");
-
-            TestObj1 = null;
-            TestObj2 = "Bangalore";
-            Assert.AreEqual(false, OdbcMetaDataCollectionNames.Equals(TestObj1, TestObj2), "#3 null to not-null");
-
-            TestObj1 = "Bangalore";
-            TestObj2 = null;
-            Assert.AreEqual(false, OdbcMetaDataCollectionNames.Equals(TestObj1, TestObj2), "#4 not-null to null");
-
-            TestObj1 = null;
-            TestObj2 = null;
-            Assert.AreEqual(true, OdbcMetaDataCollectionNames.Equals(TestObj1, TestObj2), "#5 null to null");
-        }
-    }
-}

+ 0 - 56
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcMetaDataColumnNamesTest.cs

@@ -1,56 +0,0 @@
-// OdbcMetaDataColumnNamesTest.cs - NUnit Test Cases for testing the
-//                          OdbcMetaDataColumnNames class
-// Author:
-//      Nidhi Rawal ([email protected])
-//
-// Copyright (c) 2007 Novell Inc., and the individuals listed
-// on the ChangeLog entries.
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Data;
-using System.Data.Odbc;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.Odbc
-{
-
-	[TestFixture]
-	[Category ("odbc")]
-	public class OdbcMetaDataColumnNamesTest
-	{
-		[Test]
-		public void ReferenceEqualsTest ()
-		{
-			OdbcMetaDataColumnNames om = new OdbcMetaDataColumnNames ();
-			object o1 = null;
-			object o2 = null;
-			object o3 = new object ();
-
-			Assert.AreEqual(true, OdbcOdbcMetaDataColumnNames.ReferenceEquals (o1, o2),"#1 Comparing the references of two objects");
-			o2 = o3;
-			Assert.AreEqual(true, OdbcOdbcMetaDataColumnNames.ReferenceEquals (o2, o3), "#2 Comparing the references of two objects after making them equal");
-			Assert.AreEqual(false, OdbcOdbcMetaDataColumnNames.ReferenceEquals (o1, o2), "#3 Comparing the references of two objects that we compared earlier");
-		}
-	}
-}

+ 1 - 326
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs

@@ -61,331 +61,6 @@ namespace MonoTests.System.Data.Odbc
 			} finally {
 				ConnectionManager.Singleton.CloseConnection ();
 			}
+                }
         }
-
-		[Test]
-		public void InsertTest()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter (); //not initialized and not yet added
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcCmd.Parameters.Insert (1, p2Age); //Inserting the second parameter
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#2 Collection now contains both the parameters");
-
-				//check the inserted positions
-				Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf ("@lname"));  //checking the positions as string
-				Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf (p2Age));     //checking the positions as OdbcParameter
-				Assert.AreEqual (-1, OdbcCmd.Parameters.IndexOf ("non-exixting-parameter"));     //non exixting parameters should return index -1
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-
-		}
-
-
-		[Test]
-		public void AddRangeTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter (); //not initialized and not yet added
-				OdbcParameter p3Tmp = new OdbcParameter (); //not initialized and not yet added
-				OdbcParameter p4Tmp = new OdbcParameter (); //not initialized and not yet added
-				OdbcParameter p5Tmp = new OdbcParameter (); //not initialized and not yet added
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcParameter [] paramArray = new OdbcParameter [4];
-				paramArray [0] = p2Age;
-				paramArray [1] = p3Tmp;
-				paramArray [2] = p4Tmp;
-				paramArray [3] = p5Tmp;
-				OdbcCmd.Parameters.AddRange (paramArray);
-				Assert.AreEqual (5, OdbcCmd.Parameters.Count, "#2 The array elements are added");
-				Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf (p2Age), "#3 The first element must be added after the last parameter");
-				Assert.AreEqual (4, OdbcCmd.Parameters.IndexOf (p5Tmp), "#4 Ensure all the elements are added");
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		[ExpectedException (typeof (ArgumentOutOfRangeException))]
-		public void InsertArgumentGreaterThanCountTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter ();
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcCmd.Parameters.Insert (2, p2Age); //Inserting with wrong index
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		[ExpectedException (typeof (ArgumentOutOfRangeException))]
-		public void InsertNegetiveArgumentTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter (); //not initialized and not added
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure no other parameters are present");
-				OdbcCmd.Parameters.Insert (-3, p2Age); //Insert with negetive index
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		[ExpectedException (typeof (ArgumentException))]
-		public void AddRangeParameterAlreadyContainedTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter (); //not initialized and not yet added
-				OdbcParameter p3Tmp = new OdbcParameter (); //not initialized and not yet added
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcParameter [] paramArray = new OdbcParameter [3];
-				paramArray [0] = p2Age;
-				paramArray [1] = p1Lname; //p1Lname is already contained
-				paramArray [2] = p3Tmp;
-				OdbcCmd.Parameters.AddRange (paramArray);
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		[ExpectedException (typeof (ArgumentNullException))]
-		public void AddRangeArgumentNullExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter ();
-				OdbcParameter p3Tmp = new OdbcParameter ();
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcParameter [] paramArray = new OdbcParameter [3];
-				paramArray [0] = p2Age;
-				paramArray [1] = p3Tmp;
-				paramArray [2] = null;
-				OdbcCmd.Parameters.AddRange (paramArray);
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		[Test]
-		public void AddRangeMultiDimensionalArrayTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = new OdbcParameter ();
-				OdbcParameter p3Tmp = new OdbcParameter ();
-				OdbcParameter p4Tmp = new OdbcParameter ();
-				OdbcParameter p5Tmp = new OdbcParameter ();
-
-				Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#1 Make sure only the initializing parameter is added");
-				OdbcParameter [,] paramArray = new OdbcParameter [2, 2];
-				paramArray [0, 0] = p2Age;
-				paramArray [0, 1] = p3Tmp;
-				paramArray [1, 0] = p4Tmp;
-				paramArray [1, 1] = p5Tmp;
-				OdbcCmd.Parameters.AddRange (paramArray);
-				Assert.AreEqual (5, OdbcCmd.Parameters.Count, "#2 Four parameters of the 2x2 Array are added");
-				Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf (p2Age), "#3 The first element must be added after the last parameter");
-				Assert.AreEqual (4, OdbcCmd.Parameters.IndexOf (p5Tmp), "#4 Ensure all the elements are added");
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-
-		//<remarks>
-		//Tests all the three overloads of Contains
-		//</remarks>
-		[Test]
-		public void ContainsTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-				OdbcParameter p3Tmp = new OdbcParameter ();
-				OdbcCmd.Parameters.Insert (2, p3Tmp);
-
-				Assert.AreEqual (3, OdbcCmd.Parameters.Count, "#1 All the parameters are added");
-				Assert.IsTrue (OdbcCmd.Parameters.Contains (p1Lname), "#2 Checking Contains with OdbcParameter value");
-				Assert.IsTrue (OdbcCmd.Parameters.Contains ("@age"), "#3 Checking Contains with string value");
-				Assert.IsTrue (OdbcCmd.Parameters.Contains (p3Tmp), "#4 Checking Contains with object value");
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		public void IndexOfTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-				OdbcParameter p3Tmp = new OdbcParameter ();
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#1 both the parameters are added");
-
-				Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf (p1Lname), "#1 first parameter");
-				Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf (p2Age), "#2 second parametr");
-				Assert.AreEqual (-1, OdbcCmd.Parameters.IndexOf (p3Tmp), "#3 not present");
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		public void CopyToTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#1 Make sure both the parameters are present");
-				OdbcParameter [] DestinationParamArray = new OdbcParameter [4];
-
-				OdbcCmd.Parameters.CopyTo (DestinationParamArray, 1); //starting at 1 instead of 0
-
-				Assert.AreEqual (4, DestinationParamArray.Length, "#2 The array length should not change");
-				Assert.AreEqual ("@lname", DestinationParamArray [1].ParameterName, "#3 The first parameter copied to array at index 1");
-				Assert.AreEqual ("@age", DestinationParamArray [2].ParameterName, "#4 The second parameter copied to array at index 2");
-				Assert.AreEqual (null, DestinationParamArray [0], "#5 The remaining elements remain un-initialized");
-				Assert.AreEqual (null, DestinationParamArray [3], "#6 The remaining elements remain un-initialized");
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentException))]
-		public void CopyToArgumentExceptionTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#1 Make sure both the parameters are present");
-				OdbcParameter [] DestinationParamArray = new OdbcParameter [4];
-
-				OdbcCmd.Parameters.CopyTo (DestinationParamArray, 3); //starting at 3, thus the second element will be at index 4
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentException))]
-		public void CopyToMultiDimensionalArrayTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#1 Make sure both the parameters are present");
-				OdbcParameter [,] DestinationParamArray = new OdbcParameter [2, 4];
-
-				OdbcCmd.Parameters.CopyTo (DestinationParamArray, 1); //DestinationParamArray is multi Dimensional
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-
-		[Test]
-		[ExpectedException (typeof (ArgumentOutOfRangeException))]
-		public void CopyToLowerBoundCheckTest ()
-		{
-			IDbConnection conn = ConnectionManager.Singleton.Connection;
-			try {
-				ConnectionManager.Singleton.OpenConnection ();
-				OdbcCommand OdbcCmd = (OdbcCommand) conn.CreateCommand ();
-				OdbcCmd.CommandType = CommandType.Text;
-				OdbcCmd.CommandText = "SELECT fname FROM employee WHERE lname=? AND age=?";
-				OdbcParameter p1Lname = OdbcCmd.Parameters.Add ("@lname", OdbcType.Text, 15);
-				OdbcParameter p2Age = OdbcCmd.Parameters.Add ("@age", OdbcType.Int, 2);
-
-				Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#1 Make sure both the parameters are present");
-				OdbcParameter [] DestinationParamArray = new OdbcParameter [4];
-
-				OdbcCmd.Parameters.CopyTo (DestinationParamArray, -1); //index must be >= 0
-			} finally {
-				ConnectionManager.Singleton.CloseConnection ();
-			}
-		}
-	}
 }