From: Sergey K. <jus...@us...> - 2005-05-05 19:29:19
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21725/src/NHibernate.Test/NHSpecificTest Modified Files: BasicClassFixture.cs BasicObjectFixture.cs BasicSerializableFixture.cs BasicTimeFixture.cs CollectionFixture.cs GetTest.cs LazyLoadBugTest.cs MapFixture.cs NH47Fixture.cs NodeFixture.cs SimpleComponentFixture.cs UnsavedValueFixture.cs UserTypeFixture.cs Log Message: * Better SQLite support - only about 20 test cases fail on SQLite, mostly due to bugs in SQLite ADO.NET provider * Modified TestCase to clean up unclosed sessions in TearDown - not completely bullet-proof, since some tests don't call TearDown, but covers a lot of the cases. * Changed sessions.OpenSession() to OpenSession() in all tests * Added Dialect.SupportsSubSelects property for use in tests instead of (dialect is SomeDialect) expressions. Index: BasicClassFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** BasicClassFixture.cs 30 Dec 2004 16:25:13 -0000 1.12 --- BasicClassFixture.cs 5 May 2005 19:27:55 -0000 1.13 *************** *** 31,35 **** public void TestPrivateFieldAccess() { ! ISession s = sessions.OpenSession(); BasicClass bc = new BasicClass(); --- 31,35 ---- public void TestPrivateFieldAccess() { ! ISession s = OpenSession(); BasicClass bc = new BasicClass(); *************** *** 40,44 **** s.Close(); ! s = sessions.OpenSession(); bc = (BasicClass)s.Load( typeof(BasicClass), (int)1 ); Assert.AreEqual( 5, bc.ValueOfPrivateField, "private field accessor" ); --- 40,44 ---- s.Close(); ! s = OpenSession(); bc = (BasicClass)s.Load( typeof(BasicClass), (int)1 ); Assert.AreEqual( 5, bc.ValueOfPrivateField, "private field accessor" ); *************** *** 61,65 **** // make sure the previous insert went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 61,65 ---- // make sure the previous insert went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 83,87 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 83,87 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 99,103 **** // update a property to make sure it picks up that it is dirty ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 99,103 ---- // update a property to make sure it picks up that it is dirty ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 114,118 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 114,118 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 130,134 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 130,134 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 145,149 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 145,149 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 160,164 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 160,164 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 175,179 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 175,179 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 190,194 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 190,194 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 205,209 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 205,209 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 220,224 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 220,224 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 235,239 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 235,239 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 250,254 **** // make sure the previous updates went through ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 250,254 ---- // make sure the previous updates went through ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 265,269 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 265,269 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 300,304 **** // modify the array so it is updated - should not be recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 300,304 ---- // modify the array so it is updated - should not be recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 315,319 **** // change the array to a new array so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 315,319 ---- // change the array to a new array so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 331,335 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 331,335 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 366,370 **** // modify the array so it is updated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 366,370 ---- // modify the array so it is updated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 386,390 **** // modify the array to a new array so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 386,390 ---- // modify the array to a new array so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 402,406 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 402,406 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 436,440 **** // modify the array so it is updated - should not be recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 436,440 ---- // modify the array so it is updated - should not be recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 454,458 **** // change the List to a new List so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 454,458 ---- // change the List to a new List so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 472,476 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 472,476 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 506,510 **** // modify the array so it is updated - should not be recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 506,510 ---- // modify the array so it is updated - should not be recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 523,527 **** // change the List to a new List so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 523,527 ---- // change the List to a new List so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 541,545 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 541,545 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 575,579 **** // modify the bag so it is updated - should not be recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 575,579 ---- // modify the bag so it is updated - should not be recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 592,596 **** // add an item to the list ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 592,596 ---- // add an item to the list ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 608,612 **** // change the List to a new List so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 608,612 ---- // change the List to a new List so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 626,630 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 626,630 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 653,658 **** originalCount = basicClass.StringBag.Count; ! ISession s = sessions.OpenSession(); ! ISession s2 = sessions.OpenSession(); BasicClass bc = (BasicClass)s.Load( typeof(BasicClass), id ); --- 653,658 ---- originalCount = basicClass.StringBag.Count; ! ISession s = OpenSession(); ! ISession s2 = OpenSession(); BasicClass bc = (BasicClass)s.Load( typeof(BasicClass), id ); *************** *** 684,688 **** // modify the array so it is updated - should not be recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 684,688 ---- // modify the array so it is updated - should not be recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 701,705 **** // add an item to the list ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 701,705 ---- // add an item to the list ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 717,721 **** // change the List to a new List so it is recreated ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 717,721 ---- // change the List to a new List so it is recreated ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 735,739 **** // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = sessions.OpenSession(); t[index] = s[index].BeginTransaction(); --- 735,739 ---- // VERIFY PREVIOUS UPDATE & PERFORM DELETE ! s[index] = OpenSession(); t[index] = s[index].BeginTransaction(); *************** *** 757,761 **** { ! ISession s = sessions.OpenSession(); BasicClass bc = new BasicClass(); --- 757,761 ---- { ! ISession s = OpenSession(); BasicClass bc = new BasicClass(); *************** *** 768,772 **** s.Close(); ! s = sessions.OpenSession(); bc = (BasicClass)s.Load( typeof(BasicClass), id ); --- 768,772 ---- s.Close(); ! s = OpenSession(); bc = (BasicClass)s.Load( typeof(BasicClass), id ); *************** *** 782,786 **** internal void AssertDelete(int id) { ! ISession s = sessions.OpenSession(); try --- 782,786 ---- internal void AssertDelete(int id) { ! ISession s = OpenSession(); try *************** *** 805,809 **** internal BasicClass InsertBasicClass(int id) { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 805,809 ---- internal BasicClass InsertBasicClass(int id) { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); Index: CollectionFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/CollectionFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CollectionFixture.cs 26 Mar 2005 12:18:54 -0000 1.1 --- CollectionFixture.cs 5 May 2005 19:27:55 -0000 1.2 *************** *** 24,28 **** int parentId = 0; ! using( ISession s1 = sessions.OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { --- 24,28 ---- int parentId = 0; ! using( ISession s1 = OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { *************** *** 40,44 **** // try to Load the object to make sure the save worked ! using( ISession s2 = sessions.OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { --- 40,44 ---- // try to Load the object to make sure the save worked ! using( ISession s2 = OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { *************** *** 54,58 **** int childId = 0; ! using( ISession s1 = sessions.OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { --- 54,58 ---- int childId = 0; ! using( ISession s1 = OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { *************** *** 71,75 **** // try to Load the object to make sure the save worked ! using( ISession s2 = sessions.OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { --- 71,75 ---- // try to Load the object to make sure the save worked ! using( ISession s2 = OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { Index: SimpleComponentFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/SimpleComponentFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleComponentFixture.cs 20 Sep 2004 17:46:00 -0000 1.2 --- SimpleComponentFixture.cs 5 May 2005 19:27:55 -0000 1.3 *************** *** 22,26 **** [Test] public void TestLoad() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 22,26 ---- [Test] public void TestLoad() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); *************** *** 44,48 **** public void TestInsert() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 44,48 ---- public void TestInsert() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); Index: UnsavedValueFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/UnsavedValueFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UnsavedValueFixture.cs 20 Sep 2004 17:46:00 -0000 1.3 --- UnsavedValueFixture.cs 5 May 2005 19:27:55 -0000 1.4 *************** *** 29,33 **** // open the first session to SaveOrUpdate it - should be Save ! ISession s1 = sessions.OpenSession(); ITransaction t1 = s1.BeginTransaction(); s1.SaveOrUpdate(unsavedToSave); --- 29,33 ---- // open the first session to SaveOrUpdate it - should be Save ! ISession s1 = OpenSession(); ITransaction t1 = s1.BeginTransaction(); s1.SaveOrUpdate(unsavedToSave); *************** *** 40,44 **** // use the ICriteria interface to get another instance in a different // session ! ISession s2 = sessions.OpenSession(); ITransaction t2 = s2.BeginTransaction(); --- 40,44 ---- // use the ICriteria interface to get another instance in a different // session ! ISession s2 = OpenSession(); ITransaction t2 = s2.BeginTransaction(); *************** *** 61,65 **** // create a new session for the Update ! ISession s3 = sessions.OpenSession(); ITransaction t3 = s3.BeginTransaction(); --- 61,65 ---- // create a new session for the Update ! ISession s3 = OpenSession(); ITransaction t3 = s3.BeginTransaction(); *************** *** 75,79 **** // lets get a list of all the rows in the table to make sure // that there has not been any extra inserts ! ISession s4 = sessions.OpenSession(); ITransaction t4 = s4.BeginTransaction(); --- 75,79 ---- // lets get a list of all the rows in the table to make sure // that there has not been any extra inserts ! ISession s4 = OpenSession(); ITransaction t4 = s4.BeginTransaction(); *************** *** 92,96 **** // lets make sure the object was deleted ! ISession s5 = sessions.OpenSession(); try { --- 92,96 ---- // lets make sure the object was deleted ! ISession s5 = OpenSession(); try { Index: BasicSerializableFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicSerializableFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicSerializableFixture.cs 31 Aug 2004 20:37:29 -0000 1.1 --- BasicSerializableFixture.cs 5 May 2005 19:27:55 -0000 1.2 *************** *** 31,35 **** public void TestCRUD() { ! ISession s = sessions.OpenSession(); BasicSerializable ser = new BasicSerializable(); SerializableClass serClass = ser.SerializableProperty; --- 31,35 ---- public void TestCRUD() { ! ISession s = OpenSession(); BasicSerializable ser = new BasicSerializable(); SerializableClass serClass = ser.SerializableProperty; *************** *** 38,42 **** s.Close(); ! s = sessions.OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.IsNull( ser.Serial , "should have saved as null" ); --- 38,42 ---- s.Close(); ! s = OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.IsNull( ser.Serial , "should have saved as null" ); *************** *** 46,50 **** s.Close(); ! s = sessions.OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.IsTrue( ser.Serial is SerializableClass, "should have been a SerializableClass" ); --- 46,50 ---- s.Close(); ! s = OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.IsTrue( ser.Serial is SerializableClass, "should have been a SerializableClass" ); *************** *** 61,65 **** s.Close(); ! s = sessions.OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); --- 61,65 ---- s.Close(); ! s = OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); *************** *** 73,77 **** s.Close(); ! s = sessions.OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.AreEqual( "modify me", ser.SerializableProperty._classString ); --- 73,77 ---- s.Close(); ! s = OpenSession(); ser = (BasicSerializable)s.Load( typeof(BasicSerializable), ser.Id ); Assert.AreEqual( "modify me", ser.SerializableProperty._classString ); Index: NH47Fixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/NH47Fixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NH47Fixture.cs 24 Apr 2005 15:41:58 -0000 1.2 --- NH47Fixture.cs 5 May 2005 19:27:55 -0000 1.3 *************** *** 27,31 **** if (objs != null && objs.Length > 0) { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 27,31 ---- if (objs != null && objs.Length > 0) { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); Index: UserTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/UserTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserTypeFixture.cs 11 Jun 2004 20:09:30 -0000 1.1 --- UserTypeFixture.cs 5 May 2005 19:27:55 -0000 1.2 *************** *** 28,32 **** public void InsertNull() { ! ISession s = sessions.OpenSession(); ClassWithNullColumns userTypeClass = new ClassWithNullColumns(); --- 28,32 ---- public void InsertNull() { ! ISession s = OpenSession(); ClassWithNullColumns userTypeClass = new ClassWithNullColumns(); Index: BasicObjectFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicObjectFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BasicObjectFixture.cs 17 Jan 2005 03:40:52 -0000 1.3 --- BasicObjectFixture.cs 5 May 2005 19:27:55 -0000 1.4 *************** *** 33,37 **** public void TestCRUD() { ! ISession s = sessions.OpenSession(); BasicObjectRef any = new BasicObjectRef(); --- 33,37 ---- public void TestCRUD() { ! ISession s = OpenSession(); BasicObjectRef any = new BasicObjectRef(); *************** *** 52,56 **** s.Close(); ! s = sessions.OpenSession(); bo = (BasicObject)s.Load( typeof(BasicObject), bo.Id ); --- 52,56 ---- s.Close(); ! s = OpenSession(); bo = (BasicObject)s.Load( typeof(BasicObject), bo.Id ); Index: BasicTimeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicTimeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicTimeFixture.cs 3 Nov 2004 03:37:06 -0000 1.1 --- BasicTimeFixture.cs 5 May 2005 19:27:55 -0000 1.2 *************** *** 25,34 **** BasicTime basic = Create(1); ! ISession s = sessions.OpenSession(); s.Save(basic); s.Flush(); s.Close(); ! s = sessions.OpenSession(); BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); --- 25,34 ---- BasicTime basic = Create(1); ! ISession s = OpenSession(); s.Save(basic); s.Flush(); s.Close(); ! s = OpenSession(); BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); *************** *** 51,60 **** BasicTime basic = Create(1); ! ISession s = sessions.OpenSession(); s.Save(basic); s.Flush(); s.Close(); ! s = sessions.OpenSession(); BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); --- 51,60 ---- BasicTime basic = Create(1); ! ISession s = OpenSession(); s.Save(basic); s.Flush(); s.Close(); ! s = OpenSession(); BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); *************** *** 67,71 **** s.Close(); ! s = sessions.OpenSession(); basic = (BasicTime)s.Load( typeof(BasicTime), 1 ); // make sure the 0 index saved with values in Time --- 67,71 ---- s.Close(); ! s = OpenSession(); basic = (BasicTime)s.Load( typeof(BasicTime), 1 ); // make sure the 0 index saved with values in Time *************** *** 89,98 **** BasicTime basic = Create(1); ! ISession s = sessions.OpenSession(); s.Save( basic ); s.Flush(); s.Close(); ! s = sessions.OpenSession(); basic = (BasicTime)s.Load( typeof(BasicTime), 1 ); --- 89,98 ---- BasicTime basic = Create(1); ! ISession s = OpenSession(); s.Save( basic ); s.Flush(); s.Close(); ! s = OpenSession(); basic = (BasicTime)s.Load( typeof(BasicTime), 1 ); *************** *** 102,106 **** s.Close(); ! s = sessions.OpenSession(); // make sure the update went through BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); --- 102,106 ---- s.Close(); ! s = OpenSession(); // make sure the update went through BasicTime basicLoaded = (BasicTime)s.Load( typeof(BasicTime), 1 ); Index: LazyLoadBugTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/LazyLoadBugTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LazyLoadBugTest.cs 11 Feb 2005 05:15:35 -0000 1.2 --- LazyLoadBugTest.cs 5 May 2005 19:27:55 -0000 1.3 *************** *** 21,25 **** int parentId = 0; ! using( ISession s1 = sessions.OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { --- 21,25 ---- int parentId = 0; ! using( ISession s1 = OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { *************** *** 36,40 **** // try to Load the object to get the exception ! using( ISession s2 = sessions.OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { --- 36,40 ---- // try to Load the object to get the exception ! using( ISession s2 = OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { *************** *** 54,58 **** int parentId = 0; ! using( ISession s1 = sessions.OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { --- 54,58 ---- int parentId = 0; ! using( ISession s1 = OpenSession() ) using( ITransaction t1 = s1.BeginTransaction() ) { *************** *** 70,74 **** // try to Load the object to make sure the save worked ! using( ISession s2 = sessions.OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { --- 70,74 ---- // try to Load the object to make sure the save worked ! using( ISession s2 = OpenSession() ) using( ITransaction t2 = s2.BeginTransaction() ) { Index: MapFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/MapFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MapFixture.cs 18 Nov 2004 02:47:00 -0000 1.3 --- MapFixture.cs 5 May 2005 19:27:55 -0000 1.4 *************** *** 35,39 **** [Test] public void TestSelect() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 35,39 ---- [Test] public void TestSelect() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); *************** *** 61,65 **** public void TestInverse() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 61,65 ---- public void TestInverse() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); *************** *** 78,82 **** [Test] public void TestSort() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 78,82 ---- [Test] public void TestSort() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); *************** *** 102,106 **** [Test] public void TestInsert() { ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 102,106 ---- [Test] public void TestInsert() { ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); Index: NodeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/NodeFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NodeFixture.cs 18 Nov 2004 02:47:00 -0000 1.4 --- NodeFixture.cs 5 May 2005 19:27:55 -0000 1.5 *************** *** 39,43 **** levelThreeNode.AddDestinationNode(endNode); ! ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); --- 39,43 ---- levelThreeNode.AddDestinationNode(endNode); ! ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); *************** *** 55,59 **** // verify these nodes were actually saved and can be queried correctly. ! ISession s2 = sessions.OpenSession(); ITransaction t2 = s2.BeginTransaction(); --- 55,59 ---- // verify these nodes were actually saved and can be queried correctly. ! ISession s2 = OpenSession(); ITransaction t2 = s2.BeginTransaction(); *************** *** 89,93 **** s2.Close(); ! s = sessions.OpenSession(); t = s.BeginTransaction(); --- 89,93 ---- s2.Close(); ! s = OpenSession(); t = s.BeginTransaction(); *************** *** 111,115 **** s.Close(); ! s = sessions.OpenSession(); t = s.BeginTransaction(); --- 111,115 ---- s.Close(); ! s = OpenSession(); t = s.BeginTransaction(); Index: GetTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/GetTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GetTest.cs 15 Mar 2005 11:56:33 -0000 1.3 --- GetTest.cs 5 May 2005 19:27:55 -0000 1.4 *************** *** 21,30 **** A a = new A( "name" ); ! using( ISession s = sessions.OpenSession() ) { s.Save( a ); } ! using( ISession s = sessions.OpenSession() ) { A loadedA = ( A )s.Load( typeof( A ), a.Id ); --- 21,30 ---- A a = new A( "name" ); ! using( ISession s = OpenSession() ) { s.Save( a ); } ! using( ISession s = OpenSession() ) { A loadedA = ( A )s.Load( typeof( A ), a.Id ); *************** *** 36,40 **** } ! using( ISession s = sessions.OpenSession() ) { A gotA = (A)s.Get( typeof( A ), a.Id ); --- 36,40 ---- } ! using( ISession s = OpenSession() ) { A gotA = (A)s.Get( typeof( A ), a.Id ); *************** *** 51,55 **** { A a = new A( "name" ); ! using( ISession s = sessions.OpenSession() ) { s.Save( a ); --- 51,55 ---- { A a = new A( "name" ); ! using( ISession s = OpenSession() ) { s.Save( a ); *************** *** 57,61 **** } ! using( ISession s = sessions.OpenSession() ) { a = s.Get( typeof(A), a.Id ) as A; --- 57,61 ---- } ! using( ISession s = OpenSession() ) { a = s.Get( typeof(A), a.Id ) as A; *************** *** 64,68 **** } ! using( ISession s = sessions.OpenSession() ) { a = s.Get( typeof(A), a.Id ) as A; --- 64,68 ---- } ! using( ISession s = OpenSession() ) { a = s.Get( typeof(A), a.Id ) as A; |