[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source AssemblyInfo.cs,1.1.
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2003-08-02 19:14:17
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source In directory sc8-pr-cvs1:/tmp/cvs-serv1434 Modified Files: AssemblyInfo.cs PGBaseTest.cs PGCommandBuilderTest.cs PGCommandTest.cs PGConnectionTest.cs PGDataAdapterTest.cs PGDataReaderTest.cs PGTransactionTest.cs Log Message: * Changed casing of all classes from PGXXX to PgXXX to follow MS guidelines. Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/AssemblyInfo.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AssemblyInfo.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- AssemblyInfo.cs 2 Aug 2003 19:14:14 -0000 1.2 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 24,28 **** [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] ! [assembly: AssemblyProduct("PGSqlClient - ADO.NET Data provider for PostgreSQL 7.4+")] [assembly: AssemblyCopyright("2003 - Carlos Guzmán Álvarez")] [assembly: AssemblyTrademark("")] --- 24,28 ---- [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] ! [assembly: AssemblyProduct("PgSqlClient - ADO.NET Data provider for PostgreSQL 7.4+")] [assembly: AssemblyCopyright("2003 - Carlos Guzmán Álvarez")] [assembly: AssemblyTrademark("")] Index: PGBaseTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGBaseTest.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PGBaseTest.cs 30 Jul 2003 18:39:32 -0000 1.10 --- PGBaseTest.cs 2 Aug 2003 19:14:14 -0000 1.11 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 23,38 **** using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { ! public class PGBaseTest { ! private PGConnection connection; ! public PGConnection Connection { get { return connection; } } ! public PGBaseTest() { } --- 23,38 ---- using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { ! public class PgBaseTest { ! private PgConnection connection; ! public PgConnection Connection { get { return connection; } } ! public PgBaseTest() { } *************** *** 53,57 **** ConfigurationSettings.AppSettings["Port"]); ! connection = new PGConnection(connString.ToString()); connection.StateChange += new StateChangeEventHandler(stateChange); connection.Open(); --- 53,57 ---- ConfigurationSettings.AppSettings["Port"]); ! connection = new PgConnection(connString.ToString()); connection.StateChange += new StateChangeEventHandler(stateChange); connection.Open(); *************** *** 85,89 **** ConfigurationSettings.AppSettings["Port"]); ! PGConnection connection = new PGConnection(connString.ToString()); connection.Open(); --- 85,89 ---- ConfigurationSettings.AppSettings["Port"]); ! PgConnection connection = new PgConnection(connString.ToString()); connection.Open(); *************** *** 109,113 **** ConfigurationSettings.AppSettings["Port"]); ! PGConnection connection = new PGConnection(connString.ToString()); connection.Open(); --- 109,113 ---- ConfigurationSettings.AppSettings["Port"]); ! PgConnection connection = new PgConnection(connString.ToString()); connection.Open(); *************** *** 118,122 **** ConfigurationSettings.AppSettings["Database"]); ! PGCommand command = new PGCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); --- 118,122 ---- ConfigurationSettings.AppSettings["Database"]); ! PgCommand command = new PgCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); *************** *** 150,154 **** commandText.Append(") WITH OIDS;"); ! PGCommand command = new PGCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); command.Dispose(); --- 150,154 ---- commandText.Append(") WITH OIDS;"); ! PgCommand command = new PgCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); command.Dispose(); *************** *** 168,172 **** commandText.Append("LANGUAGE 'sql' VOLATILE;"); ! PGCommand command = new PGCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); --- 168,172 ---- commandText.Append("LANGUAGE 'sql' VOLATILE;"); ! PgCommand command = new PgCommand(commandText.ToString(), connection); command.ExecuteNonQuery(); *************** *** 189,206 **** string commandText = "insert into public.test_table values(@int4_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)"; ! PGTransaction transaction = connection.BeginTransaction(); ! PGCommand command = new PGCommand(commandText, connection, transaction); try { // Add command parameters ! command.Parameters.Add("@int4_field", PGDbType.Int4); ! command.Parameters.Add("@char_field", PGDbType.Char); ! command.Parameters.Add("@varchar_field", PGDbType.VarChar); ! command.Parameters.Add("@single_field", PGDbType.Float); ! command.Parameters.Add("@double_field", PGDbType.Double); ! command.Parameters.Add("@date_field", PGDbType.Date); ! command.Parameters.Add("@time_field", PGDbType.Time); ! command.Parameters.Add("@timestamp_field", PGDbType.TimeStamp); for (int i = 0; i < 100; i++) --- 189,206 ---- string commandText = "insert into public.test_table values(@int4_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)"; ! PgTransaction transaction = connection.BeginTransaction(); ! PgCommand command = new PgCommand(commandText, connection, transaction); try { // Add command parameters ! command.Parameters.Add("@int4_field", PgDbType.Int4); ! command.Parameters.Add("@char_field", PgDbType.Char); ! command.Parameters.Add("@varchar_field", PgDbType.VarChar); ! command.Parameters.Add("@single_field", PgDbType.Float); ! command.Parameters.Add("@double_field", PgDbType.Double); ! command.Parameters.Add("@date_field", PgDbType.Date); ! command.Parameters.Add("@time_field", PgDbType.Time); ! command.Parameters.Add("@timestamp_field", PgDbType.TimeStamp); for (int i = 0; i < 100; i++) *************** *** 221,225 **** transaction.Commit(); } ! catch (PGException ex) { transaction.Rollback(); --- 221,225 ---- transaction.Commit(); } ! catch (PgException ex) { transaction.Rollback(); Index: PGCommandBuilderTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGCommandBuilderTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGCommandBuilderTest.cs 30 Jul 2003 18:54:36 -0000 1.2 --- PGCommandBuilderTest.cs 2 Aug 2003 19:14:14 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,39 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGCommandBuilderTest : PGBaseTest { [Test] public void GetInsertCommandTest() { ! PGCommand command = new PGCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPGCommandBuilder - GetInsertCommand Method Test"); Console.WriteLine(builder.GetInsertCommand().CommandText); --- 19,39 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgCommandBuilderTest : PgBaseTest { [Test] public void GetInsertCommandTest() { ! PgCommand command = new PgCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPgCommandBuilder - GetInsertCommand Method Test"); Console.WriteLine(builder.GetInsertCommand().CommandText); *************** *** 47,56 **** public void GetUpdateCommandTest() { ! PGCommand command = new PGCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPGCommandBuilder - GetUpdateCommand Method Test"); Console.WriteLine(builder.GetUpdateCommand().CommandText); --- 47,56 ---- public void GetUpdateCommandTest() { ! PgCommand command = new PgCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPgCommandBuilder - GetUpdateCommand Method Test"); Console.WriteLine(builder.GetUpdateCommand().CommandText); *************** *** 64,73 **** public void GetDeleteCommandTest() { ! PGCommand command = new PGCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("PGCommandBuilder - GetDeleteCommand Method Test"); Console.WriteLine( builder.GetDeleteCommand().CommandText ); --- 64,73 ---- public void GetDeleteCommandTest() { ! PgCommand command = new PgCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("PgCommandBuilder - GetDeleteCommand Method Test"); Console.WriteLine( builder.GetDeleteCommand().CommandText ); *************** *** 81,90 **** public void RefreshSchemaTest() { ! PGCommand command = new PGCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPGCommandBuilder - RefreshSchema Method Test - Commands for original SQL statement: "); Console.WriteLine(builder.GetInsertCommand().CommandText); --- 81,90 ---- public void RefreshSchemaTest() { ! PgCommand command = new PgCommand("select * from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("\r\nPgCommandBuilder - RefreshSchema Method Test - Commands for original SQL statement: "); Console.WriteLine(builder.GetInsertCommand().CommandText); *************** *** 97,101 **** Console.WriteLine(); ! Console.WriteLine("\r\nPGCommandBuilder - RefreshSchema Method Test - Commands for new SQL statement: "); Console.WriteLine(builder.GetInsertCommand().CommandText); --- 97,101 ---- Console.WriteLine(); ! Console.WriteLine("\r\nPgCommandBuilder - RefreshSchema Method Test - Commands for new SQL statement: "); Console.WriteLine(builder.GetInsertCommand().CommandText); *************** *** 111,120 **** public void CommandBuilderWithExpressionFieldTest() { ! PGCommand command = new PGCommand("select public.test_table.*, 0 AS EXPR_VALUE from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("PGCommandBuilder - CommandBuilderWithExpressionFieldTest"); Console.WriteLine(builder.GetUpdateCommand().CommandText); --- 111,120 ---- public void CommandBuilderWithExpressionFieldTest() { ! PgCommand command = new PgCommand("select public.test_table.*, 0 AS EXPR_VALUE from public.test_table where int4_field = @int4_field and varchar_field = @varchar_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); Console.WriteLine(); ! Console.WriteLine("PgCommandBuilder - CommandBuilderWithExpressionFieldTest"); Console.WriteLine(builder.GetUpdateCommand().CommandText); *************** *** 128,140 **** public void DeriveParameters() { ! PGCommandBuilder builder = new PGCommandBuilder(); ! PGCommand command = new PGCommand("DeriveCount(10)", Connection); command.CommandType = CommandType.StoredProcedure; ! PGCommandBuilder.DeriveParameters(command); ! Console.WriteLine("\r\nPGCommandBuilder - DeriveParameters static Method Test"); for (int i = 0; i < command.Parameters.Count; i++) --- 128,140 ---- public void DeriveParameters() { ! PgCommandBuilder builder = new PgCommandBuilder(); ! PgCommand command = new PgCommand("DeriveCount(10)", Connection); command.CommandType = CommandType.StoredProcedure; ! PgCommandBuilder.DeriveParameters(command); ! Console.WriteLine("\r\nPgCommandBuilder - DeriveParameters static Method Test"); for (int i = 0; i < command.Parameters.Count; i++) Index: PGCommandTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGCommandTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PGCommandTest.cs 28 Jul 2003 18:26:41 -0000 1.8 --- PGCommandTest.cs 2 Aug 2003 19:14:14 -0000 1.9 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,46 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGCommandTest : PGBaseTest { [Test] public void ExecuteNonQueryTest() { ! Console.WriteLine("\r\nPGCommandTest.ExecuteNonQueryTest"); string commandText = "update public.test_table set char_field = @char_field, varchar_field = @varchar_field where int4_field = @int4_field"; ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand(commandText, Connection, transaction); try { // Add command parameters ! command.Parameters.Add("@char_field", PGDbType.Char); ! command.Parameters.Add("@varchar_field", PGDbType.VarChar); ! command.Parameters.Add("@int4_field", PGDbType.Int4); for (int i = 0; i < 100; i++) --- 19,46 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgCommandTest : PgBaseTest { [Test] public void ExecuteNonQueryTest() { ! Console.WriteLine("\r\nPgCommandTest.ExecuteNonQueryTest"); string commandText = "update public.test_table set char_field = @char_field, varchar_field = @varchar_field where int4_field = @int4_field"; ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand(commandText, Connection, transaction); try { // Add command parameters ! command.Parameters.Add("@char_field", PgDbType.Char); ! command.Parameters.Add("@varchar_field", PgDbType.VarChar); ! command.Parameters.Add("@int4_field", PgDbType.Int4); for (int i = 0; i < 100; i++) *************** *** 58,62 **** ExecuteReaderTest(); } ! catch (PGException ex) { transaction.Rollback(); --- 58,62 ---- ExecuteReaderTest(); } ! catch (PgException ex) { transaction.Rollback(); *************** *** 72,79 **** public void ExecuteReaderTest() { ! Console.WriteLine("\r\nPGCommandTest.ExecuteReaderTest"); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table ORDER BY date_field", Connection); ! PGDataReader reader = command.ExecuteReader(); for (int i = 0; i < reader.FieldCount; i++) --- 72,79 ---- public void ExecuteReaderTest() { ! Console.WriteLine("\r\nPgCommandTest.ExecuteReaderTest"); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table ORDER BY date_field", Connection); ! PgDataReader reader = command.ExecuteReader(); for (int i = 0; i < reader.FieldCount; i++) *************** *** 99,103 **** public void ExecuteScalarTest() { ! PGCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field"; --- 99,103 ---- public void ExecuteScalarTest() { ! PgCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field"; *************** *** 115,119 **** public void PrepareTest() { ! PGCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field"; --- 115,119 ---- public void PrepareTest() { ! PgCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field"; *************** *** 127,131 **** public void NamedParametersTest() { ! PGCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field or char_field = @char_field"; --- 127,131 ---- public void NamedParametersTest() { ! PgCommand command = Connection.CreateCommand(); command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field or char_field = @char_field"; *************** *** 134,138 **** command.Parameters.Add("@char_field", "IRow 20"); ! PGDataReader reader = command.ExecuteReader(); int count = 0; --- 134,138 ---- command.Parameters.Add("@char_field", "IRow 20"); ! PgDataReader reader = command.ExecuteReader(); int count = 0; *************** *** 152,159 **** public void ExecuteStoredProcTest() { ! PGCommand command = new PGCommand("TestCount()", Connection); command.CommandType = CommandType.StoredProcedure; ! command.Parameters.Add("@CountResult", PGDbType.Int8).Direction = ParameterDirection.Output; command.ExecuteNonQuery(); --- 152,159 ---- public void ExecuteStoredProcTest() { ! PgCommand command = new PgCommand("TestCount()", Connection); command.CommandType = CommandType.StoredProcedure; ! command.Parameters.Add("@CountResult", PgDbType.Int8).Direction = ParameterDirection.Output; command.ExecuteNonQuery(); *************** *** 168,172 **** { // Execute a SELECT command ! PGCommand selectCommand = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = 100", Connection); int recordsAffected = selectCommand.ExecuteNonQuery(); Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected); --- 168,172 ---- { // Execute a SELECT command ! PgCommand selectCommand = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = 100", Connection); int recordsAffected = selectCommand.ExecuteNonQuery(); Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected); *************** *** 176,180 **** // Execute a DELETE command ! PGCommand deleteCommand = new PGCommand("DELETE FROM public.test_table WHERE int4_field = 45", Connection); recordsAffected = deleteCommand.ExecuteNonQuery(); Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected); --- 176,180 ---- // Execute a DELETE command ! PgCommand deleteCommand = new PgCommand("DELETE FROM public.test_table WHERE int4_field = 45", Connection); recordsAffected = deleteCommand.ExecuteNonQuery(); Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected); Index: PGConnectionTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGConnectionTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PGConnectionTest.cs 26 Jul 2003 11:42:29 -0000 1.3 --- PGConnectionTest.cs 2 Aug 2003 19:14:14 -0000 1.4 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,34 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGConnectionTest : PGBaseTest { [Test] public void BeginTransactionTest() { ! PGTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); } --- 19,34 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgConnectionTest : PgBaseTest { [Test] public void BeginTransactionTest() { ! PgTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); } *************** *** 37,41 **** public void BeginTransactionReadCommittedTest() { ! PGTransaction transaction = Connection.BeginTransaction(IsolationLevel.ReadCommitted); transaction.Rollback(); } --- 37,41 ---- public void BeginTransactionReadCommittedTest() { ! PgTransaction transaction = Connection.BeginTransaction(IsolationLevel.ReadCommitted); transaction.Rollback(); } *************** *** 44,48 **** public void BeginTransactionSerializableTest() { ! PGTransaction transaction = Connection.BeginTransaction(IsolationLevel.Serializable); transaction.Rollback(); } --- 44,48 ---- public void BeginTransactionSerializableTest() { ! PgTransaction transaction = Connection.BeginTransaction(IsolationLevel.Serializable); transaction.Rollback(); } *************** *** 81,85 **** public void CreateCommandTest() { ! PGCommand command = Connection.CreateCommand(); } --- 81,85 ---- public void CreateCommandTest() { ! PgCommand command = Connection.CreateCommand(); } *************** *** 87,94 **** public void DbSchemaTest() { ! Connection.GetDbSchemaTable(PGDbSchemaType.Aggregates, null); ! Connection.GetDbSchemaTable(PGDbSchemaType.Casts, null); ! Connection.GetDbSchemaTable(PGDbSchemaType.Check_Constraints, null); ! Connection.GetDbSchemaTable(PGDbSchemaType.Columns, null); } } --- 87,94 ---- public void DbSchemaTest() { ! Connection.GetDbSchemaTable(PgDbSchemaType.Aggregates, null); ! Connection.GetDbSchemaTable(PgDbSchemaType.Casts, null); ! Connection.GetDbSchemaTable(PgDbSchemaType.Check_Constraints, null); ! Connection.GetDbSchemaTable(PgDbSchemaType.Columns, null); } } Index: PGDataAdapterTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGDataAdapterTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PGDataAdapterTest.cs 27 Jul 2003 21:19:39 -0000 1.6 --- PGDataAdapterTest.cs 2 Aug 2003 19:14:14 -0000 1.7 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,39 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGDataAdapterTest : PGBaseTest { [Test] public void FillTest() { ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE date_field = @date_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, 4, "date_field").Value = DateTime.Now; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 19,39 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgDataAdapterTest : PgBaseTest { [Test] public void FillTest() { ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE date_field = @date_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PgDbType.Date, 4, "date_field").Value = DateTime.Now; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 71,80 **** public void FillMultipleTest() { ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE date_field = @date_field", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, 4, "date_field").Value = DateTime.Now; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds1 = new DataSet(); --- 71,80 ---- public void FillMultipleTest() { ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE date_field = @date_field", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PgDbType.Date, 4, "date_field").Value = DateTime.Now; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds1 = new DataSet(); *************** *** 92,100 **** public void InsertTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection); ! PGDataAdapter adapter = new PGDataAdapter(command); ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 92,100 ---- public void InsertTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection); ! PgDataAdapter adapter = new PgDataAdapter(command); ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 126,136 **** public void UpdateCharTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 1; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 126,136 ---- public void UpdateCharTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 1; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 150,160 **** public void UpdateVarCharTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 10; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 150,160 ---- public void UpdateVarCharTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 10; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 174,184 **** public void UpdateInt2Test() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 40; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 174,184 ---- public void UpdateInt2Test() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 40; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 194,199 **** transaction.Commit(); ! command = new PGCommand("SELECT int2_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 40; short val = (short)command.ExecuteScalar(); --- 194,199 ---- transaction.Commit(); ! command = new PgCommand("SELECT int2_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 40; short val = (short)command.ExecuteScalar(); *************** *** 205,215 **** public void UpdateInt8Test() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 20; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 205,215 ---- public void UpdateInt8Test() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 20; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 225,230 **** transaction.Commit(); ! command = new PGCommand("SELECT int8_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 20; long val = (long)command.ExecuteScalar(); --- 225,230 ---- transaction.Commit(); ! command = new PgCommand("SELECT int8_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 20; long val = (long)command.ExecuteScalar(); *************** *** 236,246 **** public void UpdateDoubleTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 50; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 236,246 ---- public void UpdateDoubleTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 50; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 256,261 **** transaction.Commit(); ! command = new PGCommand("SELECT double_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 50; double val = (double)command.ExecuteScalar(); --- 256,261 ---- transaction.Commit(); ! command = new PgCommand("SELECT double_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 50; double val = (double)command.ExecuteScalar(); *************** *** 267,277 **** public void UpdateMoneyField() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 27; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 267,277 ---- public void UpdateMoneyField() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 27; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 287,292 **** transaction.Commit(); ! command = new PGCommand("SELECT money_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 27; float val = (float)command.ExecuteScalar(); --- 287,292 ---- transaction.Commit(); ! command = new PgCommand("SELECT money_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 27; float val = (float)command.ExecuteScalar(); *************** *** 298,308 **** public void UpdateNumericTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 60; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 298,308 ---- public void UpdateNumericTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 60; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 318,323 **** transaction.Commit(); ! command = new PGCommand("SELECT numeric_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 60; decimal val = (decimal)command.ExecuteScalar(); --- 318,323 ---- transaction.Commit(); ! command = new PgCommand("SELECT numeric_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 60; decimal val = (decimal)command.ExecuteScalar(); *************** *** 332,342 **** public void UpdateDateTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 70; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 332,342 ---- public void UpdateDateTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 70; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 354,359 **** transaction.Commit(); ! command = new PGCommand("SELECT date_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 70; DateTime val = (DateTime)command.ExecuteScalar(); --- 354,359 ---- transaction.Commit(); ! command = new PgCommand("SELECT date_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 70; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 367,377 **** public void UpdateTimeTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 80; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 367,377 ---- public void UpdateTimeTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 80; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 389,394 **** transaction.Commit(); ! command = new PGCommand("SELECT time_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 80; DateTime val = (DateTime)command.ExecuteScalar(); --- 389,394 ---- transaction.Commit(); ! command = new PgCommand("SELECT time_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 80; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 402,412 **** public void UpdateTimeStampTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 90; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 402,412 ---- public void UpdateTimeStampTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 90; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); *************** *** 424,429 **** transaction.Commit(); ! command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 90; DateTime val = (DateTime)command.ExecuteScalar(); --- 424,429 ---- transaction.Commit(); ! command = new PgCommand("SELECT timestamp_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 90; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 440,450 **** public void DeleteTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 35; ! PGCommandBuilder builder = new PGCommandBuilder(adapter); DataSet ds = new DataSet(); --- 440,450 ---- public void DeleteTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction); ! PgDataAdapter adapter = new PgDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PgDbType.Int4, 4, "int4_field").Value = 35; ! PgCommandBuilder builder = new PgCommandBuilder(adapter); DataSet ds = new DataSet(); Index: PGDataReaderTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGDataReaderTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGDataReaderTest.cs 15 Jul 2003 19:11:39 -0000 1.2 --- PGDataReaderTest.cs 2 Aug 2003 19:14:14 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,39 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGDataReaderTest : PGBaseTest { [Test] public void ReadTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PGDataReader reader = command.ExecuteReader(); while (reader.Read()) { --- 19,39 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgDataReaderTest : PgBaseTest { [Test] public void ReadTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PgDataReader reader = command.ExecuteReader(); while (reader.Read()) { *************** *** 54,63 **** public void GetValuesTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PGDataReader reader = command.ExecuteReader(); while (reader.Read()) { --- 54,63 ---- public void GetValuesTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PgDataReader reader = command.ExecuteReader(); while (reader.Read()) { *************** *** 81,90 **** public void IndexerByIndexTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PGDataReader reader = command.ExecuteReader(); while (reader.Read()) { --- 81,90 ---- public void IndexerByIndexTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PgDataReader reader = command.ExecuteReader(); while (reader.Read()) { *************** *** 105,114 **** public void IndexerByNameTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PGDataReader reader = command.ExecuteReader(); while (reader.Read()) { --- 105,114 ---- public void IndexerByNameTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection, transaction); Console.WriteLine("\r\nDataReader - Read Method - Test"); ! PgDataReader reader = command.ExecuteReader(); while (reader.Read()) { *************** *** 129,136 **** public void GetSchemaTableTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT * FROM public.test_table", Connection, transaction); ! PGDataReader reader = command.ExecuteReader(CommandBehavior.SchemaOnly); DataTable schema = reader.GetSchemaTable(); --- 129,136 ---- public void GetSchemaTableTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT * FROM public.test_table", Connection, transaction); ! PgDataReader reader = command.ExecuteReader(CommandBehavior.SchemaOnly); DataTable schema = reader.GetSchemaTable(); *************** *** 166,173 **** public void GetSchemaTableWithExpressionFieldTest() { ! PGTransaction transaction = Connection.BeginTransaction(); ! PGCommand command = new PGCommand("SELECT *, 0 AS VALOR FROM public.test_table", Connection, transaction); ! PGDataReader reader = command.ExecuteReader(CommandBehavior.SchemaOnly); DataTable schema = reader.GetSchemaTable(); --- 166,173 ---- public void GetSchemaTableWithExpressionFieldTest() { ! PgTransaction transaction = Connection.BeginTransaction(); ! PgCommand command = new PgCommand("SELECT *, 0 AS VALOR FROM public.test_table", Connection, transaction); ! PgDataReader reader = command.ExecuteReader(CommandBehavior.SchemaOnly); DataTable schema = reader.GetSchemaTable(); Index: PGTransactionTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGTransactionTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGTransactionTest.cs 15 Jul 2003 19:11:39 -0000 1.2 --- PGTransactionTest.cs 2 Aug 2003 19:14:14 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,29 **** using System; using System.Data; ! using PostgreSql.Data.PGSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PGSqlClient.UnitTests { [TestFixture] ! public class PGTransactionTest : PGBaseTest { [Test] --- 19,29 ---- using System; using System.Data; ! using PostgreSql.Data.PgSqlClient; using NUnit.Framework; ! namespace PostgreSql.Data.PgSqlClient.UnitTests { [TestFixture] ! public class PgTransactionTest : PgBaseTest { [Test] *************** *** 31,35 **** { Console.WriteLine("\r\nStarting transaction"); ! PGTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); } --- 31,35 ---- { Console.WriteLine("\r\nStarting transaction"); ! PgTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); } *************** *** 39,43 **** { Console.WriteLine("\r\nStarting transaction - ReadCommitted"); ! PGTransaction transaction = Connection.BeginTransaction(IsolationLevel.ReadCommitted); transaction.Rollback(); } --- 39,43 ---- { Console.WriteLine("\r\nStarting transaction - ReadCommitted"); ! PgTransaction transaction = Connection.BeginTransaction(IsolationLevel.ReadCommitted); transaction.Rollback(); } *************** *** 47,51 **** { Console.WriteLine("\r\nStarting transaction - Serializable"); ! PGTransaction transaction = Connection.BeginTransaction(IsolationLevel.Serializable); transaction.Rollback(); } --- 47,51 ---- { Console.WriteLine("\r\nStarting transaction - Serializable"); ! PgTransaction transaction = Connection.BeginTransaction(IsolationLevel.Serializable); transaction.Rollback(); } *************** *** 55,59 **** { Console.WriteLine("\r\nTestin transaction Commit"); ! PGTransaction transaction = Connection.BeginTransaction(); transaction.Commit(); transaction.Dispose(); --- 55,59 ---- { Console.WriteLine("\r\nTestin transaction Commit"); ! PgTransaction transaction = Connection.BeginTransaction(); transaction.Commit(); transaction.Dispose(); *************** *** 64,68 **** { Console.WriteLine("\r\nTestin transaction Rollback"); ! PGTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); transaction.Dispose(); --- 64,68 ---- { Console.WriteLine("\r\nTestin transaction Rollback"); ! PgTransaction transaction = Connection.BeginTransaction(); transaction.Rollback(); transaction.Dispose(); |