[pgsqlclient-checkins] SF.net SVN: pgsqlclient: [75] trunk/pgsqlclient/source/UnitTests
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2006-03-29 11:11:12
|
Revision: 75 Author: carlosga_fb Date: 2006-03-29 03:10:57 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/pgsqlclient/?rev=75&view=rev Log Message: ----------- ?\194?\183 Removed obsolote calls Modified Paths: -------------- trunk/pgsqlclient/source/UnitTests/PgArrayTest.cs trunk/pgsqlclient/source/UnitTests/PgCommandTest.cs trunk/pgsqlclient/source/UnitTests/PgDataAdapterTest.cs trunk/pgsqlclient/source/UnitTests/PgGeometicTypesTest.cs Modified: trunk/pgsqlclient/source/UnitTests/PgArrayTest.cs =================================================================== --- trunk/pgsqlclient/source/UnitTests/PgArrayTest.cs 2006-03-29 11:02:41 UTC (rev 74) +++ trunk/pgsqlclient/source/UnitTests/PgArrayTest.cs 2006-03-29 11:10:57 UTC (rev 75) @@ -59,7 +59,7 @@ int updated = command.ExecuteNonQuery(); - Assertion.AssertEquals("Invalid number of inserted rows", updated, 1); + Assert.AreEqual(1, updated, "Invalid number of inserted rows"); Console.WriteLine("Checking inserted values"); Modified: trunk/pgsqlclient/source/UnitTests/PgCommandTest.cs =================================================================== --- trunk/pgsqlclient/source/UnitTests/PgCommandTest.cs 2006-03-29 11:02:41 UTC (rev 74) +++ trunk/pgsqlclient/source/UnitTests/PgCommandTest.cs 2006-03-29 11:10:57 UTC (rev 75) @@ -177,15 +177,15 @@ Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected); selectCommand.Dispose(); - Assertion.Assert(recordsAffected == -1); + Assert.IsTrue(recordsAffected == -1); // 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); deleteCommand.Dispose(); - - Assertion.Assert(recordsAffected == 1); + + Assert.IsTrue(recordsAffected == 1); } [Test] Modified: trunk/pgsqlclient/source/UnitTests/PgDataAdapterTest.cs =================================================================== --- trunk/pgsqlclient/source/UnitTests/PgDataAdapterTest.cs 2006-03-29 11:02:41 UTC (rev 74) +++ trunk/pgsqlclient/source/UnitTests/PgDataAdapterTest.cs 2006-03-29 11:10:57 UTC (rev 75) @@ -200,7 +200,7 @@ short val = (short)command.ExecuteScalar(); - Assertion.AssertEquals("int2_field has not correct value", System.Int16.MaxValue, val); + Assert.AreEqual(System.Int16.MaxValue, val, "int2_field has not correct value"); } [Test] @@ -231,7 +231,7 @@ long val = (long)command.ExecuteScalar(); - Assertion.AssertEquals("int8_field has not correct value", System.Int32.MaxValue, val); + Assert.AreEqual(System.Int32.MaxValue, val, "int8_field has not correct value"); } [Test] @@ -262,7 +262,7 @@ double val = (double)command.ExecuteScalar(); - Assertion.AssertEquals("double_field has not correct value", System.Int32.MaxValue, val); + Assert.AreEqual(System.Int32.MaxValue, val, "double_field has not correct value"); } [Test] @@ -293,7 +293,7 @@ float val = (float)command.ExecuteScalar(); - Assertion.AssertEquals("money_field has not correct value", 200.20, val); + Assert.AreEqual(200.20, val, "money_field has not correct value"); } [Test] @@ -326,7 +326,7 @@ if (val != (decimal)System.Int16.MaxValue) { - Assertion.Fail("numeric_field has not correct value"); + Assert.Fail("numeric_field has not correct value"); } } @@ -360,9 +360,9 @@ DateTime val = (DateTime)command.ExecuteScalar(); - Assertion.AssertEquals("date_field has not correct day", dt.Day, val.Day); - Assertion.AssertEquals("date_field has not correct month", dt.Month, val.Month); - Assertion.AssertEquals("date_field has not correct year", dt.Year, val.Year); + Assert.AreEqual(dt.Day, val.Day, "date_field has not correct day"); + Assert.AreEqual(dt.Month, val.Month, "date_field has not correct month"); + Assert.AreEqual(dt.Year, val.Year, "date_field has not correct year"); } [Test] @@ -395,9 +395,9 @@ DateTime val = (DateTime)command.ExecuteScalar(); - Assertion.AssertEquals("time_field has not correct hour", dt.Hour, val.Hour); - Assertion.AssertEquals("time_field has not correct minute", dt.Minute, val.Minute); - Assertion.AssertEquals("time_field has not correct second", dt.Second, val.Second); + Assert.AreEqual(dt.Hour, val.Hour, "time_field has not correct hour"); + Assert.AreEqual(dt.Minute, val.Minute, "time_field has not correct minute"); + Assert.AreEqual(dt.Second, val.Second, "time_field has not correct second"); } [Test] @@ -430,12 +430,12 @@ DateTime val = (DateTime)command.ExecuteScalar(); - Assertion.AssertEquals("timestamp_field has not correct day", dt.Day, val.Day); - Assertion.AssertEquals("timestamp_field has not correct month", dt.Month, val.Month); - Assertion.AssertEquals("timestamp_field has not correct year", dt.Year, val.Year); - Assertion.AssertEquals("timestamp_field has not correct hour", dt.Hour, val.Hour); - Assertion.AssertEquals("timestamp_field has not correct minute", dt.Minute, val.Minute); - Assertion.AssertEquals("timestamp_field has not correct second", dt.Second, val.Second); + Assert.AreEqual(dt.Day, val.Day, "timestamp_field has not correct day"); + Assert.AreEqual(dt.Month, val.Month, "timestamp_field has not correct month"); + Assert.AreEqual(dt.Year, val.Year, "timestamp_field has not correct year"); + Assert.AreEqual(dt.Hour, val.Hour, "timestamp_field has not correct hour"); + Assert.AreEqual(dt.Minute, val.Minute, "timestamp_field has not correct minute"); + Assert.AreEqual(dt.Second, val.Second, "timestamp_field has not correct second"); } [Test] Modified: trunk/pgsqlclient/source/UnitTests/PgGeometicTypesTest.cs =================================================================== --- trunk/pgsqlclient/source/UnitTests/PgGeometicTypesTest.cs 2006-03-29 11:02:41 UTC (rev 74) +++ trunk/pgsqlclient/source/UnitTests/PgGeometicTypesTest.cs 2006-03-29 11:10:57 UTC (rev 75) @@ -42,8 +42,8 @@ Console.WriteLine("Point value: {0}", point.ToString()); - Assertion.AssertEquals("Invalid X coord in point", 50, point.X); - Assertion.AssertEquals("Invalid Y coord in point", 60, point.Y); + Assert.AreEqual(50, point.X, "Invalid X coord in point"); + Assert.AreEqual(60, point.Y, "Invalid Y coord in point"); } catch (Exception) { @@ -67,11 +67,11 @@ Console.WriteLine("Box value: {0}", box.ToString()); - Assertion.AssertEquals("Invalid X coord in Lower Left corner", 0, box.LowerLeft.X); - Assertion.AssertEquals("Invalid Y coord in Lower Left corner", 70, box.LowerLeft.Y); + Assert.AreEqual(0, box.LowerLeft.X, "Invalid X coord in Lower Left corner"); + Assert.AreEqual(70, box.LowerLeft.Y, "Invalid Y coord in Lower Left corner"); - Assertion.AssertEquals("Invalid X coord in Upper Right corner", 70, box.UpperRight.X); - Assertion.AssertEquals("Invalid Y coord in Upper Right corner", 70, box.UpperRight.Y); + Assert.AreEqual(70, box.UpperRight.X, "Invalid X coord in Upper Right corner"); + Assert.AreEqual(70, box.UpperRight.Y, "Invalid Y coord in Upper Right corner"); } catch (Exception) { @@ -95,9 +95,9 @@ Console.WriteLine("Circle value: {0}", circle.ToString()); - Assertion.AssertEquals("Invalid X coord in circle", 30, circle.Center.X); - Assertion.AssertEquals("Invalid Y coord in circle", 0, circle.Center.Y); - Assertion.AssertEquals("Invalid RADIUS coord in circle", 30, circle.Radius); + Assert.AreEqual(30, circle.Center.X, "Invalid X coord in circle"); + Assert.AreEqual(0, circle.Center.Y, "Invalid Y coord in circle"); + Assert.AreEqual(30, circle.Radius, "Invalid RADIUS coord in circle"); } catch (Exception) { @@ -121,11 +121,11 @@ Console.WriteLine("LSeg value: {0}", lseg.ToString()); - Assertion.AssertEquals("Invalid X coord in start point", -1, lseg.StartPoint.X); - Assertion.AssertEquals("Invalid Y coord in start point", 0, lseg.StartPoint.Y); + Assert.AreEqual(-1, lseg.StartPoint.X, "Invalid X coord in start point"); + Assert.AreEqual(0, lseg.StartPoint.Y, "Invalid Y coord in start point"); - Assertion.AssertEquals("Invalid X coord in end point", 1, lseg.EndPoint.X); - Assertion.AssertEquals("Invalid Y coord in end point", 0, lseg.EndPoint.Y); + Assert.AreEqual(1, lseg.EndPoint.X, "Invalid X coord in end point"); + Assert.AreEqual(0, lseg.EndPoint.Y, "Invalid Y coord in end point"); } catch (Exception) { @@ -149,11 +149,11 @@ Console.WriteLine("Path value: {0}", path.ToString()); - Assertion.AssertEquals("Invalid X coord in path point 0", 0, path.Points[0].X); - Assertion.AssertEquals("Invalid Y coord in path point 0", 0, path.Points[0].Y); + Assert.AreEqual(0, path.Points[0].X, "Invalid X coord in path point 0"); + Assert.AreEqual(0, path.Points[0].Y, "Invalid Y coord in path point 0"); - Assertion.AssertEquals("Invalid X coord in path point 1", 1, path.Points[1].X); - Assertion.AssertEquals("Invalid Y coord in path point 1", 0, path.Points[1].Y); + Assert.AreEqual(1, path.Points[1].X, "Invalid X coord in path point 1"); + Assert.AreEqual(0, path.Points[1].Y, "Invalid Y coord in path point 1"); } catch (Exception) { @@ -177,11 +177,11 @@ Console.WriteLine("Polygon value: {0}", polygon.ToString()); - Assertion.AssertEquals("Invalid X coord in polygon point 0", 1, polygon.Points[0].X); - Assertion.AssertEquals("Invalid Y coord in polygon point 0", 1, polygon.Points[0].Y); + Assert.AreEqual(1, polygon.Points[0].X, "Invalid X coord in polygon point 0"); + Assert.AreEqual(1, polygon.Points[0].Y, "Invalid Y coord in polygon point 0"); - Assertion.AssertEquals("Invalid X coord in polygon point 1", 0, polygon.Points[1].X); - Assertion.AssertEquals("Invalid Y coord in polygon point 1", 0, polygon.Points[1].Y); + Assert.AreEqual(0, polygon.Points[1].X, "Invalid X coord in polygon point 1"); + Assert.AreEqual(0, polygon.Points[1].Y, "Invalid Y coord in polygon point 1"); } catch (Exception) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |