From: Michael D. <mik...@us...> - 2005-05-06 14:19:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26414 Modified Files: ABCTest.cs Log Message: Fixed order of test run problem. If Subclassing was run before Subselect then Subselect would fail. Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ABCTest.cs 5 May 2005 19:27:52 -0000 1.13 --- ABCTest.cs 6 May 2005 14:19:10 -0000 1.14 *************** *** 153,156 **** --- 153,178 ---- t.Commit(); s.Close(); + + // need to clean up the objects created by this test or Subselect() will fail + // because there are rows in the table. There must be some difference in the order + // that NUnit and JUnit run their tests. + s = OpenSession(); + t = s.BeginTransaction(); + + IList aList = s.Find( "from A" ); + IList dList = s.Find( "from D" ); + + foreach( A aToDelete in aList ) + { + s.Delete( aToDelete ); + } + + foreach( D dToDelete in dList ) + { + s.Delete( dToDelete ); + } + + t.Commit(); + s.Close(); } } |