Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/DriverTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/DriverTest
Modified Files:
NullReferenceFixture.cs
Log Message:
Major TestCase refactoring:
- schema is now always set up in TestCase.TestFixtureSetUp and dropped in TestCase.TestFixtureTearDown
- added property Mappings and MappingsAssembly to specify mappings declaratively instead of manually calling SchemaExport
! all tests now have to clean up the database after themselves! This is checked in TestCase.TearDown.
- test cases not cleaning up the database were fixed
- SetUp and TearDown are non-virtual, test writers are supposed to override OnSetUp and OnTearDown instead.
- Added TypeFixtureBase for type-related fixtures to reduce code duplication somewhat
These modifications sped up tests 10 times on my machine.
Index: NullReferenceFixture.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/DriverTest/NullReferenceFixture.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NullReferenceFixture.cs 5 May 2005 19:27:54 -0000 1.3
--- NullReferenceFixture.cs 6 May 2005 23:41:16 -0000 1.4
***************
*** 11,18 ****
public class NullReferenceFixture : TestCase
{
! [SetUp]
! public void Setup()
{
! ExportSchema( new string[] { "Simple.hbm.xml"} );
}
--- 11,20 ----
public class NullReferenceFixture : TestCase
{
! protected override IList Mappings
{
! get
! {
! return new string[] { "Simple.hbm.xml"};
! }
}
|