From: Sergey K. <jus...@us...> - 2005-03-15 11:56:46
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6948/src/NHibernate.Test/NHSpecificTest Modified Files: GetTest.cs Log Message: * NH-230 bug fix * Implemented GetFilterTranslator closer to the H2.1 implementation * Added forgotten Flush in GetTest.GetAndModify Index: GetTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/GetTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GetTest.cs 8 Mar 2005 14:43:41 -0000 1.2 --- GetTest.cs 15 Mar 2005 11:56:33 -0000 1.3 *************** *** 51,68 **** { A a = new A( "name" ); ! ISession s = sessions.OpenSession(); ! s.Save( a ); ! s.Close(); ! s = sessions.OpenSession(); ! a = s.Get( typeof(A), a.Id ) as A; ! a.Name = "modified"; ! s.Flush(); ! s.Close(); ! s = sessions.OpenSession(); ! a = s.Get( typeof(A), a.Id ) as A; ! Assert.AreEqual( "modified", a.Name, "the name was modified" ); ! s.Close(); } } --- 51,72 ---- { A a = new A( "name" ); ! using( ISession s = sessions.OpenSession() ) ! { ! s.Save( a ); ! s.Flush(); ! } ! using( ISession s = sessions.OpenSession() ) ! { ! a = s.Get( typeof(A), a.Id ) as A; ! a.Name = "modified"; ! s.Flush(); ! } ! using( ISession s = sessions.OpenSession() ) ! { ! a = s.Get( typeof(A), a.Id ) as A; ! Assert.AreEqual( "modified", a.Name, "the name was modified" ); ! } } } |