ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gba...@apache.org
Subject svn commit: r170389 - in /incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test: Maps/PostgreSQL/Npgsql/Account.xml Maps/PostgreSQL/Npgsql/LineItem.xml Maps/PostgreSQL/Npgsql/Order.xml Maps/PostgreSQL/Npgsql/ResultClass.xml NUnit/SqlMapTests/ParameterMapTest.cs NUnit/SqlMapTests/ResultMapTest.cs
Date Mon, 16 May 2005 14:17:57 GMT
Author: gbayon
Date: Mon May 16 07:17:56 2005
New Revision: 170389

URL: http://svn.apache.org/viewcvs?rev=170389&view=rev
Log:
- updated test for Postgres 

On all the test still remains 4 that fail but none are the fault of iBatis.NET

IBatisNet.DataMapper.Test.NUnit.SqlMapTests.ParameterMapTest.TestByteArrayTypeHandler -->
seems there is a bug in the provider

IBatisNet.DataMapper.Test.NUnit.SqlMapTests.StatementTest.TestDeleteWithComments --> Postgres
return 2 rows deleted but we deleted 4 (so it's not a bug)

IBatisNet.DataMapper.Test.NUnit.SqlMapTests.StatementTest.TestExecuteQueryForObjectAsHashtableResultClass
--> Postgres return alias column as lower so the test fails but the result is good

IBatisNet.DataMapper.Test.NUnit.SqlMapTests.StatementTest.TestQueryForListWithHashtableResultClass
--> Same, Postgres return alias column as lower so the test fails but the result is good

That seems very good, remains test for procedure

Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/LineItem.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Order.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ResultClass.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ResultMapTest.cs

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml
Mon May 16 07:17:56 2005
@@ -168,6 +168,8 @@
 			order by Account_ID
 		</select>
   
+		<!-- Nunit test fails as all columns names are lower Id is id, ... 
+		but the result is good -->
 		<select id="GetAccountAsHashtableResultClass"
 						parameterClass="int"
 						resultClass="HashMap">
@@ -180,6 +182,8 @@
 			where Account_ID = #value#
 		</select>
   
+  		<!-- Nunit test fails as all columns names are lower Id is id, ... 
+		but the result is good -->
 		<select id="GetAllAccountsAsHashtableViaResultClass"
 						resultClass="Hashtable">
 			select

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/LineItem.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/LineItem.xml?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/LineItem.xml
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/LineItem.xml
Mon May 16 07:17:56 2005
@@ -164,6 +164,7 @@
 		</insert>
 		
   		<!-- JIRA 23 -->
+  		<!-- Fails because Postgres returns that 2 rows have been modified but we deleted
4 ! -->
 		<delete id="DeleteWithComments" >
 			<!-- Delete LineItems -->
 			delete from LineItems where Order_ID = 10;

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Order.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Order.xml?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Order.xml
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Order.xml
Mon May 16 07:17:56 2005
@@ -319,7 +319,7 @@
 		<parameterMap id="insert-params">
 			<parameter property="Id" dbType="Integer"/>
 			<parameter property="Account.Id"/>
-			<parameter property="Date" nullValue="01/01/0001 00:00:00" />
+			<parameter property="Date" nullValue="01-01-0001 00:00:00" /><!-- ISO format
"YYYY-MM-DD HH:MM:SS" -->
 			<parameter property="CardExpiry" />
 			<parameter property="CardType" />			
 			<parameter property="CardNumber" />

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ResultClass.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ResultClass.xml?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ResultClass.xml
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/ResultClass.xml
Mon May 16 07:17:56 2005
@@ -25,7 +25,7 @@
 		<statement id="GetDate"
 					parameterClass="Int"
 					resultClass="date" >
-			select '2003-02-15 8:15:00' from Orders where Order_ID  = #value#
+			select '2003-02-15 8:15:00'::timestamp from Orders where Order_ID  = #value#
 		</statement>
 									
 		<statement id="GetDecimal"
@@ -37,7 +37,7 @@
 		<statement id="GetDouble"
 					parameterClass="Int"
 					resultClass="double" >
-			select 99.5 from Orders where Order_ID= #value#
+			select CAST(99.5 as float8) from Orders where Order_ID= #value#
 		</statement>
 
 		<statement id="GetGuid"
@@ -67,7 +67,7 @@
 		<statement id="GetSingle"
 					parameterClass="Int"
 					resultClass="float" >
-			select 92233.5 from Orders where Order_ID = #value#
+			select CAST(92233.5as float4) from Orders where Order_ID = #value#
 		</statement>
 						
 		<statement id="GetString"

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
Mon May 16 07:17:56 2005
@@ -126,7 +126,7 @@
 			order.City = "Lyon";
 			order.Date = DateTime.MinValue; //<-- null replacement
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaParameterMap", order);
@@ -206,7 +206,7 @@
 			order.City = "Lyon";
 			order.Date = DateTime.MinValue; 
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaParameterMap", order);
@@ -257,7 +257,7 @@
 			order.City = "Lyon";
 			order.Date = DateTime.MinValue; //<-- null replacement
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaExtendParameterMap", order);

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ResultMapTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ResultMapTest.cs?rev=170389&r1=170388&r2=170389&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ResultMapTest.cs
(original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ResultMapTest.cs
Mon May 16 07:17:56 2005
@@ -325,7 +325,7 @@
 			order.City = "Lyon";
 			order.Date = System.DateTime.MinValue; 
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaParameterMap", order);
@@ -374,7 +374,7 @@
 			order.City = "Lyon";
 			order.Date = System.DateTime.MinValue; //<-- null replacement for parameterMAp 
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaParameterMap", order);
@@ -416,7 +416,7 @@
 			order.City = "Lyon";
 			order.Date = System.DateTime.MinValue; //<-- null replacement
 			order.PostalCode = "69004";
-			order.Province = "Rhône";
+			order.Province = "Rhone";
 			order.Street = "rue Durand";
  
 			sqlMap.Insert("InsertOrderViaParameterMap", order);



Mime
View raw message