You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/04/13 21:53:54 UTC

svn commit: r161201 - in incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test: Maps/MSSQL/Odbc/Account.xml Maps/MSSQL/OleDb/Account.xml Maps/MSSQL/SqlClient/Account.xml NUnit/SqlMapTests/CacheTest.cs

Author: gbayon
Date: Wed Apr 13 12:53:51 2005
New Revision: 161201

URL: http://svn.apache.org/viewcvs?view=rev&rev=161201
Log:
- Adde Nunit test for JIRA28

Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml?view=diff&r1=161200&r2=161201
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml Wed Apr 13 12:53:51 2005
@@ -92,6 +92,15 @@
 			order by Account_ID
 		</select>
   
+    	<select id="GetNoAccountWithCache"
+						parameterClass="Integer"
+						resultMap="account-hashtable-result"
+						cacheModel="account-cache">
+			select *
+			from Accounts
+			where Account_ID = #value#
+		</select>
+		
 		<select id="GetAccountAsHashtable"
 						parameterClass="Integer"
 						resultMap="account-hashtable-result">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml?view=diff&r1=161200&r2=161201
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml Wed Apr 13 12:53:51 2005
@@ -91,7 +91,16 @@
 			from Accounts
 			order by Account_ID
 		</select>
-  
+
+  		<select id="GetNoAccountWithCache"
+						parameterClass="Integer"
+						resultMap="account-hashtable-result"
+						cacheModel="account-cache">
+			select *
+			from Accounts
+			where Account_ID = #value#
+		</select>
+		  
 		<select id="GetAccountAsHashtable"
 						parameterClass="Integer"
 						resultMap="account-hashtable-result">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml?view=diff&r1=161200&r2=161201
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml Wed Apr 13 12:53:51 2005
@@ -129,6 +129,15 @@
 			order by Account_ID
 		</select>
   
+  		<select id="GetNoAccountWithCache"
+						parameterClass="Integer"
+						resultMap="account-hashtable-result"
+						cacheModel="account-cache">
+			select *
+			from Accounts
+			where Account_ID = #value#
+		</select>
+		
   		<select id="SelectWithProperty"
 					resultMap="account-result">
 			select *

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs?view=diff&r1=161200&r2=161201
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs Wed Apr 13 12:53:51 2005
@@ -47,6 +47,17 @@
 		#region Test cache
 
 		/// <summary>
+		/// Test for JIRA 29
+		/// </summary>
+		[Test] 
+		public void TestJIRA28()
+		{
+			Account account = sqlMap.QueryForObject("GetNoAccountWithCache",-99) as Account;
+
+			Assert.IsNull(account);
+		}
+
+		/// <summary>
 		/// Test Cache query
 		/// </summary>
 		[Test]