From: Michael D. <mik...@us...> - 2004-06-07 20:37:13
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8031 Modified Files: ABCProxyTest.cs ABCTest.cs FooBarTest.cs FumTest.cs TestCase.cs Log Message: Moved the TearDown method into the base class TestCase Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** FooBarTest.cs 4 Jun 2004 12:02:44 -0000 1.23 --- FooBarTest.cs 7 Jun 2004 20:35:44 -0000 1.24 *************** *** 30,44 **** "Location.hbm.xml", "Stuff.hbm.xml", ! //"Container.hbm.xml", "XY.hbm.xml" }, true); } - [TearDown] - public void TearDown() - { - DropSchema(); - } - [Test] [Ignore("Fails because Proxies are not working.")] --- 30,38 ---- "Location.hbm.xml", "Stuff.hbm.xml", ! "Container.hbm.xml", "XY.hbm.xml" }, true); } [Test] [Ignore("Fails because Proxies are not working.")] Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ABCProxyTest.cs 3 Jun 2004 18:00:31 -0000 1.5 --- ABCProxyTest.cs 7 Jun 2004 20:35:42 -0000 1.6 *************** *** 16,25 **** } - [TearDown] - public void TearDown() - { - DropSchema(); - } - [Test] [Ignore("Test will fail because of proxy initalization problems")] --- 16,19 ---- Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TestCase.cs 16 Apr 2004 14:07:19 -0000 1.11 --- TestCase.cs 7 Jun 2004 20:35:44 -0000 1.12 *************** *** 9,12 **** --- 9,14 ---- using NHibernate.Tool.hbm2ddl; + using NUnit.Framework; + namespace NHibernate.Test { *************** *** 18,21 **** --- 20,38 ---- protected ISessionFactory sessions; + /// <summary> + /// Removes the tables used in this TestCase. + /// </summary> + /// <remarks> + /// If the tables are not cleaned up sometimes SchemaExport runs into + /// Sql errors because it can't drop tables because of the FKs. This + /// will occur if the TestCase does not have the same hbm.xml files + /// included as a previous one. + /// </remarks> + [TearDown] + public virtual void TearDown() + { + DropSchema(); + } + public void ExportSchema(string[] files) { Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ABCTest.cs 3 Jun 2004 18:00:31 -0000 1.5 --- ABCTest.cs 7 Jun 2004 20:35:43 -0000 1.6 *************** *** 19,28 **** } - [TearDown] - public void TearDown() - { - DropSchema(); - } - [Test] public void Subclassing() --- 19,22 ---- Index: FumTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FumTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FumTest.cs 3 Jun 2004 19:03:40 -0000 1.2 --- FumTest.cs 7 Jun 2004 20:35:44 -0000 1.3 *************** *** 42,52 **** } - - [TearDown] - public void TearDown() - { - DropSchema(); - } - static FumCompositeID FumKey(String str) { --- 42,45 ---- |