You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael D. <mik...@us...> - 2005-05-07 14:18:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30913/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21 Modified Files: Fixture.cs Log Message: - Doc Fixture Test now clean up properly. - GetTest no longer has test case order dependency problems with id values. Index: Fixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21/Fixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Fixture.cs 6 May 2005 23:41:18 -0000 1.3 --- Fixture.cs 7 May 2005 14:18:35 -0000 1.4 *************** *** 43,46 **** --- 43,54 ---- session.Close(); + // clean up + session = OpenSession(); + + session.Delete( "from Person" ); + session.Delete( "from Address" ); + session.Flush(); + session.Close(); + } |
From: Michael D. <mik...@us...> - 2005-05-07 14:18:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30913/src/NHibernate.Test/NHSpecificTest Modified Files: GetTest.cs Log Message: - Doc Fixture Test now clean up properly. - GetTest no longer has test case order dependency problems with id values. Index: GetTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/GetTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GetTest.cs 6 May 2005 23:41:17 -0000 1.5 --- GetTest.cs 7 May 2005 14:18:35 -0000 1.6 *************** *** 13,16 **** --- 13,18 ---- get { + // have to use classes with proxies to test difference + // between Get() and Load() return new string[] { "ABCProxy.hbm.xml" }; } *************** *** 42,46 **** "Load should not initialize the object" ); ! Assert.IsNotNull( s.Load( typeof( A ), 2 ), "Loading non-existent object should not return null" ); } --- 44,48 ---- "Load should not initialize the object" ); ! Assert.IsNotNull( s.Load( typeof( A ), ( a.Id + 1 ) ), "Loading non-existent object should not return null" ); } *************** *** 52,56 **** "Get should initialize the object" ); ! Assert.IsNull( s.Get( typeof( A ), 2 ), "Getting non-existent object should return null" ); } --- 54,58 ---- "Get should initialize the object" ); ! Assert.IsNull( s.Get( typeof( A ), ( a.Id + 1 ) ), "Getting non-existent object should return null" ); } |
From: Michael D. <mik...@us...> - 2005-05-07 14:17:31
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30507 Modified Files: releasenotes.txt Log Message: added note about Test Fixture running much quicker now. Index: releasenotes.txt =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/releasenotes.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** releasenotes.txt 5 May 2005 13:18:02 -0000 1.34 --- releasenotes.txt 7 May 2005 14:17:13 -0000 1.35 *************** *** 31,34 **** --- 31,35 ---- - Modified Expression to return ICriterion instead of Expression class. This will break existing code. - Modified nhibernate-configuration-2.0.xsd to not require <mappings>. + - Modified TestFixtures in NHibernate.Test to only execute create/drop ddl in the TestFixtureSetUp/TestFixtureTearDown. - Split QueryFunctionStandard into ISQLFunction interface and StandardSQLFunction. - Upgraded to nant-0.85-rc3 and nunit-2.2.0. |
From: Michael D. <mik...@us...> - 2005-05-07 14:16:56
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30328 Modified Files: release-package.bat Log Message: nunit reports not installed yet since nant upgrade. Index: release-package.bat =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/release-package.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** release-package.bat 6 May 2005 21:06:54 -0000 1.2 --- release-package.bat 7 May 2005 14:16:47 -0000 1.3 *************** *** 1,2 **** NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:vshik.installed=true -D:nunit2report.installed=true clean-bin package >release-package.log \ No newline at end of file --- 1,2 ---- NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:vshik.installed=true -D:nunit2report.installed=false clean-bin package >release-package.log \ No newline at end of file |
From: Michael D. <mik...@us...> - 2005-05-07 04:27:33
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv791 Modified Files: NHibernateSolution.build Log Message: Fixed up the build files and doc generation to reduce amount of copying. Index: NHibernateSolution.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/NHibernateSolution.build,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** NHibernateSolution.build 6 May 2005 08:21:45 -0000 1.31 --- NHibernateSolution.build 7 May 2005 04:27:25 -0000 1.32 *************** *** 260,278 **** <target name="doc" depends="init" description="Builds the API documentation and the Help Documentation" > <call target="sdkdoc" /> ! <nant target="clean package" buildfile="doc/reference/doc.build" /> <if test="${vshik.installed}"> ! <property name="help2.dir" value="${build.dir}/doc/Help2" /> ! <mkdir dir="${help2.dir}" failonerror="false" /> ! <copy if="${vshik.installed}" todir="${help2.dir}" overwrite="true" > ! <fileset basedir="doc/help2"> ! <include name="*" /> ! </fileset> ! </copy> ! <mkdir dir="${help2.dir}/Titles" failonerror="false" /> ! <move flatten="true" todir="${help2.dir}/Titles"> ! <fileset basedir="${build.dir}/doc"> <include name="**/*.HxS" /> </fileset> </move> </if> </target> --- 260,281 ---- <target name="doc" depends="init" description="Builds the API documentation and the Help Documentation" > <call target="sdkdoc" /> ! <property name="lang" value="en" /> ! <nant target="clean build" buildfile="doc/reference/doc.build"> ! <properties> ! <property name="lang" value="${lang}" /> ! </properties> ! </nant> <if test="${vshik.installed}"> ! ! <!-- ! move the generated Help2 (HxS) files from the sdk that ! were built by ndoc into the help2 folder for this build. ! --> ! <move flatten="true" todir="${build.dir}/doc/${lang}/help2/Titles"> ! <fileset basedir="${build.dir}/doc/sdk"> <include name="**/*.HxS" /> </fileset> </move> + </if> </target> |
From: Michael D. <mik...@us...> - 2005-05-07 04:27:20
|
Update of /cvsroot/nhibernate/nhibernate/doc/reference In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv760/doc/reference Modified Files: doc.build Log Message: Fixed up the build files and doc generation to reduce amount of copying. Index: doc.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/doc/reference/doc.build,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** doc.build 6 May 2005 08:22:12 -0000 1.8 --- doc.build 7 May 2005 04:27:11 -0000 1.9 *************** *** 7,11 **** <!-- Required properties: ! * build.dir - (path) root level to copy built documentation to. Only needed by package task. --> --- 7,12 ---- <!-- Required properties: ! * build.dir - (path) root level to build documentation to. If this is not supplied ! then it will be built to a folder named build under the doc folder. --> *************** *** 32,36 **** --- 33,46 ---- <property name="lang" value="en" /> + + <!-- + set the default for where all the files are output to, if this file is being + run as part of the NHSolution build then a build.dir property will be passed + in that specifies a location to output all the files + --> <property name="output.dir" value="build/${lang}" /> + <if propertyexists="build.dir"> + <property name="output.dir" value="${build.dir}/doc/${lang}" /> + </if> <target name="clean" description="Cleans any previous builds"> *************** *** 125,128 **** --- 135,139 ---- <property name="build.help2.dir" value="${output.dir}/help2" /> + <!-- convert the chm into the HxC --> <exec program="HxConv.exe" basedir="${vshik.path}"> <arg path="${output.dir}/chm/reference.chm" /> *************** *** 132,151 **** </exec> <exec program="HxComp.exe" basedir="${vshik.path}"> <arg value="-p" /> <arg path="${build.help2.dir}/reference/reference.HxC" /> <arg value="-o" /> ! <arg path="${build.help2.dir}/reference.HxS" /> </exec> <delete dir="${build.help2.dir}/reference" /> ! </target> ! ! <target name="package" depends="build" description="Copies the files built into the local build dir into the NH build dir."> ! <move todir="${build.dir}/doc/help"> ! <fileset basedir="${output.dir}"> <include name="**/*" /> </fileset> ! </move> </target> </project> --- 143,171 ---- </exec> + <mkdir dir="${build.help2.dir}/Titles" failonerror="false" /> + <!-- + Compile the HxC into an HxS that can be included + in a Help2 collection + --> <exec program="HxComp.exe" basedir="${vshik.path}"> <arg value="-p" /> <arg path="${build.help2.dir}/reference/reference.HxC" /> <arg value="-o" /> ! <arg path="${build.help2.dir}/Titles/reference.HxS" /> </exec> <delete dir="${build.help2.dir}/reference" /> ! ! <!-- ! copying the Help2 files from cvs that describe the ! Help collection, not the files generated by the build ! that contain the content ! --> ! <copy todir="${build.help2.dir}" overwrite="true" > ! <fileset basedir="../Help2"> <include name="**/*" /> </fileset> ! </copy> ! </target> </project> |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test Modified Files: ABCProxyTest.cs ABCTest.cs BlobClobTest.cs CriteriaTest.cs FooBarTest.cs FumTest.cs MasterDetailTest.cs MultiTableTest.cs NHibernate.Test-1.1.csproj NewPerformanceTest.cs NewerPerformanceTest.cs ParentChildTest.cs PerformanceTest.cs SQLFunctionsTest.cs SQLLoaderTest.cs SimpleTest.cs TestCase.cs TestTestCase.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: CriteriaTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CriteriaTest.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CriteriaTest.cs 5 May 2005 19:27:52 -0000 1.9 --- CriteriaTest.cs 6 May 2005 23:41:15 -0000 1.10 *************** *** 11,45 **** public class CriteriaTest : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml"}); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - - [Test] public void SimpleSelectTest() --- 11,22 ---- public class CriteriaTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml"}; ! } } [Test] public void SimpleSelectTest() *************** *** 131,134 **** --- 108,112 ---- s.Delete( "from Simple" ); + s.Flush(); s.Close(); } Index: SimpleTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/SimpleTest.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SimpleTest.cs 5 May 2005 19:27:53 -0000 1.9 --- SimpleTest.cs 6 May 2005 23:41:16 -0000 1.10 *************** *** 13,45 **** private DateTime updateDateTime = new DateTime(2003, 8, 17); ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] public void TestCRUD() --- 13,24 ---- private DateTime updateDateTime = new DateTime(2003, 8, 17); ! protected override IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml" }; ! } } [Test] public void TestCRUD() Index: NewerPerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NewerPerformanceTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewerPerformanceTest.cs 31 Mar 2005 12:42:39 -0000 1.1 --- NewerPerformanceTest.cs 6 May 2005 23:41:16 -0000 1.2 *************** *** 13,20 **** public class NewerPerformanceTest : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); } --- 13,22 ---- public class NewerPerformanceTest : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml"}; ! } } Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** NHibernate.Test-1.1.csproj 27 Apr 2005 09:08:38 -0000 1.72 --- NHibernate.Test-1.1.csproj 6 May 2005 23:41:15 -0000 1.73 *************** *** 933,936 **** --- 933,941 ---- /> <File + RelPath = "TypesTest\TypeFixtureBase.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UtilityTest\IdentityMapFixture.cs" SubType = "Code" Index: ParentChildTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ParentChildTest.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ParentChildTest.cs 5 May 2005 19:27:52 -0000 1.14 --- ParentChildTest.cs 6 May 2005 23:41:16 -0000 1.15 *************** *** 14,65 **** public class ParentChildTest : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml", ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "ParentChild.hbm.xml", ! "Simple.hbm.xml", ! "Container.hbm.xml", ! "Circular.hbm.xml", ! "Stuff.hbm.xml" ! } ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] [Ignore("Test not written yet.")] --- 14,45 ---- public class ParentChildTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] ! { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml", ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "ParentChild.hbm.xml", ! "Simple.hbm.xml", ! "Container.hbm.xml", ! "Circular.hbm.xml", ! "Stuff.hbm.xml" ! }; ! } } [Test] [Ignore("Test not written yet.")] Index: NewPerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NewPerformanceTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NewPerformanceTest.cs 6 Aug 2004 14:50:34 -0000 1.3 --- NewPerformanceTest.cs 6 May 2005 23:41:16 -0000 1.4 *************** *** 11,18 **** public class NewPerformanceTest : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); } --- 11,20 ---- public class NewPerformanceTest : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml"}; ! } } Index: FumTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FumTest.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** FumTest.cs 5 May 2005 19:27:52 -0000 1.21 --- FumTest.cs 6 May 2005 23:41:15 -0000 1.22 *************** *** 19,70 **** protected static short fumKeyShort = 1; ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema(new string[] { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml", ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml", ! "Container.hbm.xml", ! "Simple.hbm.xml", ! "Middle.hbm.xml" ! }, true); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] public void CriteriaCollection() --- 19,50 ---- protected static short fumKeyShort = 1; ! protected override IList Mappings { ! get ! { ! return new string[] ! { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml", ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml", ! "Container.hbm.xml", ! "Simple.hbm.xml", ! "Middle.hbm.xml" ! }; ! } } [Test] public void CriteriaCollection() Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TestCase.cs 6 May 2005 16:01:55 -0000 1.16 --- TestCase.cs 6 May 2005 23:41:16 -0000 1.17 *************** *** 20,23 **** --- 20,45 ---- /// <summary> + /// Mapping files used in the TestCase + /// </summary> + protected abstract IList Mappings { get; } + + /// <summary> + /// Assembly to load mapping files from (default is NHibernate.DomainModel). + /// </summary> + protected virtual string MappingsAssembly + { + get { return "NHibernate.DomainModel"; } + } + + /// <summary> + /// Creates the tables used in this TestCase + /// </summary> + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + ExportSchema(Mappings); + } + + /// <summary> /// Removes the tables used in this TestCase. /// </summary> *************** *** 28,45 **** /// included as a previous one. /// </remarks> [TearDown] ! public virtual void TearDown() { - bool wasUnclosedSession = false; if( lastOpenedSession != null && lastOpenedSession.IsOpen ) { - wasUnclosedSession = true; lastOpenedSession.Close(); } ! DropSchema(); ! if( wasUnclosedSession ) { ! Assert.Fail("Unclosed session"); } } --- 50,101 ---- /// included as a previous one. /// </remarks> + [TestFixtureTearDown] + public void TestFixtureTearDown() + { + DropSchema(); + } + + protected virtual void OnSetUp() + { + } + + [SetUp] + public void SetUp() + { + OnSetUp(); + } + + protected virtual void OnTearDown() + { + } + + /// <summary> + /// Checks that the test case cleans up after itself. This method + /// is not overridable, but it calls <see cref="OnTearDown" /> which is. + /// </summary> [TearDown] ! public void TearDown() ! { ! OnTearDown(); ! CheckSessionIsClosed(); ! CheckDatabaseIsClean(); ! } ! ! private void CheckSessionIsClosed() { if( lastOpenedSession != null && lastOpenedSession.IsOpen ) { lastOpenedSession.Close(); + Assert.Fail("Unclosed session"); } ! } ! private void CheckDatabaseIsClean() ! { ! using( ISession s = sessions.OpenSession() ) { ! int count = s.Delete( "from System.Object o" ); ! s.Flush(); ! Assert.AreEqual( 0, count, "Test didn't clean up the database after itself" ); } } *************** *** 52,56 **** public void ExportSchema(IList files, bool exportSchema) { ! ExportSchema( files, exportSchema, "NHibernate.DomainModel" ); } --- 108,112 ---- public void ExportSchema(IList files, bool exportSchema) { ! ExportSchema( files, exportSchema, MappingsAssembly ); } Index: SQLLoaderTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/SQLLoaderTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SQLLoaderTest.cs 5 May 2005 19:27:52 -0000 1.4 --- SQLLoaderTest.cs 6 May 2005 23:41:16 -0000 1.5 *************** *** 14,52 **** public class SQLLoaderTest : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "ABC.hbm.xml", ! "Category.hbm.xml", ! "Simple.hbm.xml", ! "Fo.hbm.xml", ! "SingleSeveral.hbm.xml", ! "Componentizable.hbm.xml" ! } ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - static int nextInt = 1; static long nextLong = 1; --- 14,33 ---- public class SQLLoaderTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] ! { ! "ABC.hbm.xml", ! "Category.hbm.xml", ! "Simple.hbm.xml", ! "Fo.hbm.xml", ! "SingleSeveral.hbm.xml", ! "Componentizable.hbm.xml" ! }; ! } } static int nextInt = 1; static long nextLong = 1; Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** FooBarTest.cs 5 May 2005 20:46:56 -0000 1.98 --- FooBarTest.cs 6 May 2005 23:41:15 -0000 1.99 *************** *** 19,49 **** } ! [SetUp] ! public void SetUp() { ! ExportSchema(new string[] { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml" , ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml", ! "Container.hbm.xml", ! "Simple.hbm.xml", ! "XY.hbm.xml" ! }, true); } - - [Test] public void CollectionVersioning() --- 19,50 ---- } ! protected override IList Mappings { ! get ! { ! return new string[] ! { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml" , ! "Fee.hbm.xml", ! "Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml", ! "Container.hbm.xml", ! "Simple.hbm.xml", ! "XY.hbm.xml" ! }; ! } } [Test] public void CollectionVersioning() *************** *** 633,637 **** s.Save( new Holder("ice cube") ); ! Assert.IsTrue( s.Find("from o in class System.Object").Count==15 ); System.Console.WriteLine( s.Find("from n in class INamed") ); Assert.AreEqual( 7, s.Find("from n in class INamed").Count ); --- 634,638 ---- s.Save( new Holder("ice cube") ); ! Assert.AreEqual( 15, s.Find("from o in class System.Object").Count ); System.Console.WriteLine( s.Find("from n in class INamed") ); Assert.AreEqual( 7, s.Find("from n in class INamed").Count ); *************** *** 806,810 **** s.Delete( baz ); s.Flush(); ! Assert.IsFalse( s.Enumerable( "from Fee" ).GetEnumerator().MoveNext() ); } } --- 807,811 ---- s.Delete( baz ); s.Flush(); ! Assert.IsTrue( IsEmpty( s.Enumerable( "from Fee" ) ) ); } } *************** *** 927,930 **** --- 928,937 ---- // a session. Assert.AreEqual( 1, loadedGlarch.ProxySet.Count ); + + using( ISession s = OpenSession() ) + { + s.Delete( "from Glarch" ); + s.Flush(); + } } *************** *** 1621,1624 **** --- 1628,1632 ---- s.Delete( f ); s.Delete( f.TheFoo ); + s.Delete( f.Component.Glarch ); s.Flush(); s.Close(); *************** *** 2249,2254 **** s.Delete(baz); ! IEnumerable enumerable = s.Enumerable("from fee in class Fee"); ! Assert.IsFalse( enumerable.GetEnumerator().MoveNext() ); t.Commit(); s.Close(); --- 2257,2261 ---- s.Delete(baz); ! Assert.IsTrue( IsEmpty( s.Enumerable( "from fee in class Fee" ) ) ); t.Commit(); s.Close(); *************** *** 2285,2288 **** --- 2292,2296 ---- } + [Test] public void CollectionsInSelect() *************** *** 2387,2393 **** s.Delete(baz2); s.Delete(foos[1]); // t.Commit(); s.Close(); - } --- 2395,2402 ---- s.Delete(baz2); s.Delete(foos[1]); + + s.Flush(); // t.Commit(); s.Close(); } *************** *** 2689,2692 **** --- 2698,2704 ---- stream = new System.IO.MemoryStream(); formatter.Serialize( stream, s ); + + s.Close(); + stream.Position = 0; s = (ISession)formatter.Deserialize(stream); *************** *** 3626,3635 **** Assert.AreEqual( 1, l.Count, "multi-column find" ); ! IEnumerator rs = s.Enumerable("select count(distinct child.id), count(distinct parent.id) from parent in class NHibernate.DomainModel.Foo, child in class NHibernate.DomainModel.Foo where parent.TheFoo = child").GetEnumerator(); ! Assert.IsTrue( rs.MoveNext() ); ! object[] row = (object[]) rs.Current; ! Assert.AreEqual( 1, row[0], "multi-column count" ); ! Assert.AreEqual( 1, row[1], "multi-column count" ); ! Assert.IsFalse( rs.MoveNext() ); rs = s.Enumerable("select child.id, parent.id, child.Long from parent in class NHibernate.DomainModel.Foo, child in class NHibernate.DomainModel.Foo where parent.TheFoo = child").GetEnumerator(); --- 3638,3655 ---- Assert.AreEqual( 1, l.Count, "multi-column find" ); ! bool supportsCountDistinct = !( dialect is Dialect.SQLiteDialect ); ! ! IEnumerator rs; ! object[] row; ! ! if( supportsCountDistinct ) ! { ! rs = s.Enumerable("select count(distinct child.id), count(distinct parent.id) from parent in class NHibernate.DomainModel.Foo, child in class NHibernate.DomainModel.Foo where parent.TheFoo = child").GetEnumerator(); ! Assert.IsTrue( rs.MoveNext() ); ! row = (object[]) rs.Current; ! Assert.AreEqual( 1, row[0], "multi-column count" ); ! Assert.AreEqual( 1, row[1], "multi-column count" ); ! Assert.IsFalse( rs.MoveNext() ); ! } rs = s.Enumerable("select child.id, parent.id, child.Long from parent in class NHibernate.DomainModel.Foo, child in class NHibernate.DomainModel.Foo where parent.TheFoo = child").GetEnumerator(); *************** *** 4385,4409 **** public void Cache() { - ISession s = OpenSession(); Immutable im = new Immutable(); - s.Save(im); - s.Flush(); - s.Close(); ! s = OpenSession(); ! s.Load( im, im.Id); ! s.Close(); ! s = OpenSession(); ! s.Load( im, im.Id); ! Immutable imFromFind = (Immutable)s.Find("from im in class Immutable where im = ?", im, NHibernateUtil.Entity(typeof(Immutable)))[0]; ! Immutable imFromLoad = (Immutable)s.Load(typeof(Immutable), im.Id); ! ! Assert.IsTrue(im==imFromFind, "cached object identity from Find "); ! Assert.IsTrue(im==imFromLoad, "cached object identity from Load "); ! s.Close(); } --- 4405,4443 ---- public void Cache() { Immutable im = new Immutable(); ! using( ISession s = OpenSession() ) ! { ! s.Save(im); ! s.Flush(); ! } ! using( ISession s = OpenSession() ) ! { ! s.Load( im, im.Id); ! } ! ! using( ISession s = OpenSession() ) ! { ! s.Load( im, im.Id); ! Immutable imFromFind = (Immutable)s.Find("from im in class Immutable where im = ?", im, NHibernateUtil.Entity(typeof(Immutable)))[0]; ! Immutable imFromLoad = (Immutable)s.Load(typeof(Immutable), im.Id); ! Assert.IsTrue(im==imFromFind, "cached object identity from Find "); ! Assert.IsTrue(im==imFromLoad, "cached object identity from Load "); ! } + // Clean up the immutable. Need to do this using direct SQL, since ISession + // refuses to delete immutable objects. + using( ISession s = OpenSession() ) + { + IDbConnection connection = s.Connection; + using( IDbCommand command = connection.CreateCommand() ) + { + command.CommandText = "delete from immut"; + command.ExecuteNonQuery(); + } + } } *************** *** 4495,4498 **** --- 4529,4533 ---- s.Delete(v); s.Delete(v); + s.Flush(); s.Close(); } *************** *** 4712,4715 **** --- 4747,4751 ---- Assert.IsTrue(err); + s.Flush(); s.Close(); *************** *** 4775,4779 **** Assert.IsTrue( foo.Object is One ); Assert.AreEqual( oid, s.GetIdentifier( foo.Object ) ); ! s.Delete(foo); s.Flush(); s.Close(); --- 4811,4816 ---- Assert.IsTrue( foo.Object is One ); Assert.AreEqual( oid, s.GetIdentifier( foo.Object ) ); ! s.Delete( foo ); ! s.Delete( foo.Object ); s.Flush(); s.Close(); *************** *** 5103,5106 **** --- 5140,5152 ---- s.Flush(); + + // Clean up + foreach( Foo foo in baz.FooSet ) + { + s.Delete( foo ); + } + + s.Delete( baz ); + s.Flush(); } } Index: PerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PerformanceTest.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PerformanceTest.cs 5 May 2005 19:27:52 -0000 1.12 --- PerformanceTest.cs 6 May 2005 23:41:16 -0000 1.13 *************** *** 46,54 **** bool prepareSql; ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); driverClass = (string)cfg.Properties["hibernate.connection.driver_class"]; if(driverClass.IndexOf(",") < 0) --- 46,59 ---- bool prepareSql; ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml"}; ! } ! } + protected override void OnSetUp() + { driverClass = (string)cfg.Properties["hibernate.connection.driver_class"]; if(driverClass.IndexOf(",") < 0) *************** *** 64,68 **** prepareSql = true; } - } --- 69,72 ---- Index: TestTestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestTestCase.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestTestCase.cs 9 Apr 2004 13:39:48 -0000 1.1 --- TestTestCase.cs 6 May 2005 23:41:16 -0000 1.2 *************** *** 10,13 **** --- 10,19 ---- public class TestTestCase : TestCase { + protected override System.Collections.IList Mappings + { + get { return new string[0]; } + } + + [Test] public void TestExecuteStatement() Index: SQLFunctionsTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/SQLFunctionsTest.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SQLFunctionsTest.cs 5 May 2005 19:27:52 -0000 1.10 --- SQLFunctionsTest.cs 6 May 2005 23:41:16 -0000 1.11 *************** *** 14,48 **** public class SQLFunctionsTest : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml", ! "Blobber.hbm.xml" ! } ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] [Ignore("Test not written yet.")] --- 14,25 ---- public class SQLFunctionsTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml", "Blobber.hbm.xml" }; ! } } [Test] [Ignore("Test not written yet.")] Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ABCProxyTest.cs 6 May 2005 16:01:54 -0000 1.18 --- ABCProxyTest.cs 6 May 2005 23:41:15 -0000 1.19 *************** *** 12,45 **** public class ABCProxyTest : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema(new string[] { "ABCProxy.hbm.xml"}); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] public void OptionalOneToOneInCollection() --- 12,23 ---- public class ABCProxyTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "ABCProxy.hbm.xml"}; ! } } [Test] public void OptionalOneToOneInCollection() *************** *** 135,253 **** public void Subclassing() { ! ISession s = OpenSession(); ! ITransaction t = s.BeginTransaction(); ! C1 c1 = new C1(); ! D d = new D(); ! d.Amount =213.34f; ! c1.Address = "foo bar"; ! c1.Count = 23432; ! c1.Name = "c1"; ! c1.D = d; ! s.Save(c1); ! d.Id = c1.Id; ! s.Save(d); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! // Test won't run after this line because of proxy initalization problems ! A c1a = (A) s.Load(typeof(A), c1.Id ); ! Assert.IsFalse( NHibernateUtil.IsInitialized(c1a) ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! B c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! c1a = (A) s.Load( typeof(A), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! c1a = (A) s.Load( typeof(A), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! c1 = (C1) s.Load( typeof(C1), c1.Id, LockMode.Upgrade ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! c1b = (B) s.Load( typeof(B), c1.Id, LockMode.Upgrade); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! c1a = (A) s.Load( typeof(A), c1.Id ); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! System.Console.Out.WriteLine( s.Delete("from a in class A") ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! s.Save( new B() ); ! s.Save( new A() ); ! Assert.IsTrue( s.Find("from b in class B").Count==1 ); ! Assert.IsTrue( s.Find("from a in class A").Count==2 ); ! s.Delete("from a in class A"); ! t.Commit(); ! s.Close(); } --- 113,242 ---- public void Subclassing() { ! C1 c1; ! ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! c1 = new C1(); ! D d = new D(); ! d.Amount =213.34f; ! c1.Address = "foo bar"; ! c1.Count = 23432; ! c1.Name = "c1"; ! c1.D = d; ! s.Save(c1); ! d.Id = c1.Id; ! s.Save(d); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! // Test won't run after this line because of proxy initalization problems ! A c1a = (A) s.Load(typeof(A), c1.Id ); ! Assert.IsFalse( NHibernateUtil.IsInitialized(c1a) ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! B c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! A c1a = (A) s.Load( typeof(A), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! B c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! A c1a = (A) s.Load( typeof(A), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! c1 = (C1) s.Load( typeof(C1), c1.Id, LockMode.Upgrade ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! B c1b = (B) s.Load( typeof(B), c1.Id, LockMode.Upgrade); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! A c1a = (A) s.Load( typeof(A), c1.Id ); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); ! B c1b = (B) s.Load( typeof(B), c1.Id ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); ! Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.Amount>213.3f ! ); ! Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ! ); ! System.Console.Out.WriteLine( s.Delete("from a in class A") ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Save( new B() ); ! s.Save( new A() ); ! Assert.IsTrue( s.Find("from b in class B").Count==1 ); ! Assert.IsTrue( s.Find("from a in class A").Count==2 ); ! s.Delete("from a in class A"); ! s.Delete( c1.D ); ! t.Commit(); ! } } Index: BlobClobTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/BlobClobTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BlobClobTest.cs 31 Mar 2005 12:42:39 -0000 1.1 --- BlobClobTest.cs 6 May 2005 23:41:15 -0000 1.2 *************** *** 12,16 **** /// </summary> [TestFixture] ! public class BlobClobTest : TestCase { [Test] --- 12,16 ---- /// </summary> [TestFixture] ! public abstract class BlobClobTest : TestCase { [Test] Index: MasterDetailTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/MasterDetailTest.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MasterDetailTest.cs 5 May 2005 19:27:52 -0000 1.22 --- MasterDetailTest.cs 6 May 2005 23:41:15 -0000 1.23 *************** *** 14,31 **** public class MasterDetailTest : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema(new string[] { ! "MasterDetail.hbm.xml", ! "Custom.hbm.xml", ! "Category.hbm.xml", ! "INameable.hbm.xml", ! "SingleSeveral.hbm.xml", ! "WZ.hbm.xml", ! "UpDown.hbm.xml", ! "Eye.hbm.xml", ! "MN.hbm.xml" ! }, true); } --- 14,34 ---- public class MasterDetailTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] ! { ! "MasterDetail.hbm.xml", ! "Custom.hbm.xml", ! "Category.hbm.xml", ! "INameable.hbm.xml", ! "SingleSeveral.hbm.xml", ! "WZ.hbm.xml", ! "UpDown.hbm.xml", ! "Eye.hbm.xml", ! "MN.hbm.xml" ! }; ! } } *************** *** 192,199 **** [Test] ! public void NonLazyBidrectional() { - ISession s = OpenSession(); - ITransaction t = s.BeginTransaction(); DomainModel.Single sin = new DomainModel.Single(); sin.Id = "asfdfds"; --- 195,200 ---- [Test] ! public void NonLazyBidirectional() { DomainModel.Single sin = new DomainModel.Single(); sin.Id = "asfdfds"; *************** *** 204,234 **** sin.Several.Add(sev); sev.Single = sin; - s.Save(sin); - t.Commit(); - s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! sin = (DomainModel.Single)s.Load( typeof(DomainModel.Single), sin ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! sev = (Several)s.Load( typeof(Several), sev ); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! s.Find("from s in class Several"); ! t.Commit(); ! s.Close(); ! s = OpenSession(); ! t = s.BeginTransaction(); ! s.Find("from s in class Single"); ! t.Commit(); ! s.Close(); } --- 205,250 ---- sin.Several.Add(sev); sev.Single = sin; ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Save(sin); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! sin = (DomainModel.Single)s.Load( typeof(DomainModel.Single), sin ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! sev = (Several)s.Load( typeof(Several), sev ); ! t.Commit(); ! } ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Find("from s in class Several"); ! t.Commit(); ! } ! ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Find("from s in class Single"); ! t.Commit(); ! } ! ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Delete( "from Single" ); ! t.Commit(); ! } } *************** *** 656,682 **** //if( dialect is Dialect.HSQLDialect ) return; ! ISession s = OpenSession(); ! Detail detail = new Detail(); ! SubDetail subdetail = new SubDetail(); ! Master m = new Master(); ! Master m0 = new Master(); ! object m0id = s.Save(m0); ! m0.AddDetail(detail); ! detail.Master = m0; ! m.MoreDetails.Add( detail ); ! detail.SubDetails = new Iesi.Collections.HashedSet(); ! detail.SubDetails.Add( subdetail ); ! object mid = s.Save(m); ! s.Flush(); ! s.Close(); ! s = OpenSession(); ! m = (Master)s.Load( typeof(Master), mid); ! IEnumerator enumer = m.MoreDetails.GetEnumerator(); ! enumer.MoveNext(); ! Assert.IsTrue( ((Detail)enumer.Current).SubDetails.Count!=0 ); ! s.Delete(m); ! s.Flush(); ! s.Close(); } --- 672,704 ---- //if( dialect is Dialect.HSQLDialect ) return; ! object mid; ! object m0id; ! using( ISession s = OpenSession() ) ! { ! Detail detail = new Detail(); ! SubDetail subdetail = new SubDetail(); ! Master m = new Master(); ! Master m0 = new Master(); ! m0id = s.Save(m0); ! m0.AddDetail(detail); ! detail.Master = m0; ! m.MoreDetails.Add( detail ); ! detail.SubDetails = new Iesi.Collections.HashedSet(); ! detail.SubDetails.Add( subdetail ); ! mid = s.Save(m); ! s.Flush(); ! } ! ! using( ISession s = OpenSession() ) ! { ! Master m = (Master)s.Load( typeof(Master), mid); ! IEnumerator enumer = m.MoreDetails.GetEnumerator(); ! enumer.MoveNext(); ! Assert.IsTrue( ((Detail)enumer.Current).SubDetails.Count!=0 ); ! s.Delete(m); ! s.Delete( s.Load( typeof(Master), m0id ) ); ! s.Flush(); ! } } *************** *** 797,801 **** public void Categories() { - ISession s = OpenSession(); Category c = new Category(); c.Name = Category.RootCategory; --- 819,822 ---- *************** *** 807,825 **** c2.Subcategories.Add(null); c2.Subcategories.Add(c3); - s.Save(c); - s.Flush(); - s.Close(); ! s = OpenSession(); ! c = (Category)s.Load( typeof(Category), c.Id ); ! Assert.IsNotNull( c.Subcategories[0] ); ! Assert.IsNotNull( c.Subcategories[1] ); ! IList list = ((Category)c.Subcategories[1]).Subcategories; ! Assert.IsNull(list[0]); ! Assert.IsNotNull(list[1]); ! IEnumerator enumer = s.Enumerable("from c in class Category where c.Name = NHibernate.DomainModel.Category.RootCategory").GetEnumerator(); ! Assert.IsTrue( enumer.MoveNext() ); ! s.Close(); } --- 828,856 ---- c2.Subcategories.Add(null); c2.Subcategories.Add(c3); ! using( ISession s = OpenSession() ) ! { ! s.Save( c ); ! s.Flush(); ! } ! using( ISession s = OpenSession() ) ! { ! c = (Category)s.Load( typeof(Category), c.Id ); ! Assert.IsNotNull( c.Subcategories[0] ); ! Assert.IsNotNull( c.Subcategories[1] ); ! IList list = ((Category)c.Subcategories[1]).Subcategories; ! Assert.IsNull(list[0]); ! Assert.IsNotNull(list[1]); ! ! IEnumerator enumer = s.Enumerable("from c in class Category where c.Name = NHibernate.DomainModel.Category.RootCategory").GetEnumerator(); ! Assert.IsTrue( enumer.MoveNext() ); ! } ! ! using( ISession s = OpenSession() ) ! { ! s.Delete( "from Category" ); ! s.Flush(); ! } } *************** *** 930,948 **** public void NoUpdatedManyToOne() { - ISession s = OpenSession(); W w1 = new W(); W w2 = new W(); Z z = new Z(); z.W = w1; - s.Save(z); - s.Flush(); - z.W = w2; - s.Flush(); - s.Close(); ! s = OpenSession(); ! s.Update(z); ! s.Flush(); ! s.Close(); } --- 961,990 ---- public void NoUpdatedManyToOne() { W w1 = new W(); W w2 = new W(); Z z = new Z(); z.W = w1; ! using( ISession s = OpenSession() ) ! { ! s.Save(z); ! s.Flush(); ! z.W = w2; ! s.Flush(); ! } ! ! using( ISession s = OpenSession() ) ! { ! s.Update(z); ! s.Flush(); ! } ! ! using( ISession s = OpenSession() ) ! { ! s.Delete( z ); ! s.Delete( w1 ); ! s.Delete( w2 ); ! s.Flush(); ! } } Index: MultiTableTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/MultiTableTest.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MultiTableTest.cs 5 May 2005 19:27:52 -0000 1.10 --- MultiTableTest.cs 6 May 2005 23:41:15 -0000 1.11 *************** *** 14,22 **** public class MultiTableTest : TestCase { ! [SetUp] ! public void SetUp() { ! ! ExportSchema(new string[] { "Multi.hbm.xml"}, true); } --- 14,23 ---- public class MultiTableTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "Multi.hbm.xml"}; ! } } *************** *** 669,687 **** public void DynamicUpdate() { ! ISession s = OpenSession(); Simple simple = new Simple(); simple.Name = "saved"; - object id = s.Save( simple ); - s.Flush(); ! simple.Name = "updated"; ! s.Flush(); ! s.Close(); ! s = OpenSession(); ! simple = (Simple)s.Load( typeof(Simple), id ); ! Assert.AreEqual( "updated", simple.Name, "name should have been updated" ); ! s.Close(); } --- 670,698 ---- public void DynamicUpdate() { ! object id; Simple simple = new Simple(); simple.Name = "saved"; ! using( ISession s = OpenSession() ) ! { ! id = s.Save( simple ); ! s.Flush(); ! simple.Name = "updated"; ! s.Flush(); ! } ! ! using( ISession s = OpenSession() ) ! { ! simple = (Simple)s.Load( typeof(Simple), id ); ! Assert.AreEqual( "updated", simple.Name, "name should have been updated" ); ! } ! ! using( ISession s = OpenSession() ) ! { ! s.Delete( "from Simple" ); ! s.Flush(); ! } } Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ABCTest.cs 6 May 2005 14:19:10 -0000 1.14 --- ABCTest.cs 6 May 2005 23:41:15 -0000 1.15 *************** *** 15,49 **** public class ABCTest : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema(new string[] { "ABC.hbm.xml"}); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - - [Test] [Ignore("Requires TestCase refactoring to H2.1")] --- 15,26 ---- public class ABCTest : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "ABC.hbm.xml"}; ! } } [Test] [Ignore("Requires TestCase refactoring to H2.1")] *************** *** 84,88 **** using( ITransaction t = s.BeginTransaction() ) { ! B b = (B) s.CreateQuery("from B").UniqueResult(); t.Commit(); } --- 61,72 ---- using( ITransaction t = s.BeginTransaction() ) { ! B b = (B) s.CreateQuery( "from B" ).UniqueResult(); ! t.Commit(); ! } ! ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! s.Delete( "from B" ); t.Commit(); } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/JoinedSubclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/JoinedSubclass Modified Files: JoinedSubclassExtendsFixture.cs JoinedSubclassFixture.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: JoinedSubclassFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/JoinedSubclass/JoinedSubclassFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JoinedSubclassFixture.cs 5 May 2005 19:27:55 -0000 1.4 --- JoinedSubclassFixture.cs 6 May 2005 23:41:17 -0000 1.5 *************** *** 14,27 **** public class JoinedSubclassFixture : TestCase { ! private DateTime testDateTime = new DateTime(2003, 8, 16); ! private DateTime updateDateTime = new DateTime(2003, 8, 17); ! ! [SetUp] ! public virtual void SetUp() { ! ExportSchema( new string[] { "JoinedSubclass.JoinedSubclass.hbm.xml" }, true, "NHibernate.Test" ); } [Test] public void TestJoinedSubclass() --- 14,34 ---- public class JoinedSubclassFixture : TestCase { + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } ! protected override IList Mappings { ! get ! { ! return new string[] { "JoinedSubclass.JoinedSubclass.hbm.xml" }; ! } } + + private DateTime testDateTime = new DateTime(2003, 8, 16); + private DateTime updateDateTime = new DateTime(2003, 8, 17); + [Test] public void TestJoinedSubclass() Index: JoinedSubclassExtendsFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/JoinedSubclass/JoinedSubclassExtendsFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JoinedSubclassExtendsFixture.cs 10 Dec 2004 16:40:03 -0000 1.1 --- JoinedSubclassExtendsFixture.cs 6 May 2005 23:41:17 -0000 1.2 *************** *** 17,33 **** public class JoinedSubclassExtendsFixture : JoinedSubclassFixture { ! [SetUp] ! public override void SetUp() { ! // order is important! The base classes must be configured before ! // the subclasses. ! ArrayList files = new ArrayList(); ! files.Add( "JoinedSubclass.JoinedSubclass.Person.hbm.xml" ); ! files.Add( "JoinedSubclass.JoinedSubclass.Employee.hbm.xml" ); ! files.Add( "JoinedSubclass.JoinedSubclass.Customer.hbm.xml" ); ! ! ExportSchema( files, true, "NHibernate.Test" ); } - } } --- 17,34 ---- public class JoinedSubclassExtendsFixture : JoinedSubclassFixture { ! protected override IList Mappings { ! get ! { ! // order is important! The base classes must be configured before ! // the subclasses. ! return new string[] ! { ! "JoinedSubclass.JoinedSubclass.Person.hbm.xml", ! "JoinedSubclass.JoinedSubclass.Employee.hbm.xml", ! "JoinedSubclass.JoinedSubclass.Customer.hbm.xml" ! }; ! } } } } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ExpressionTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/ExpressionTest Modified Files: QueryByExampleTest.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: QueryByExampleTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ExpressionTest/QueryByExampleTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** QueryByExampleTest.cs 5 May 2005 19:27:55 -0000 1.6 --- QueryByExampleTest.cs 6 May 2005 23:41:16 -0000 1.7 *************** *** 11,30 **** public class QueryByExampleTest : TestCase { ! #region NUnit.Framework.TestFixture Members ! [SetUp] ! public void SetUp() { - ExportSchema( new string[] { "Componentizable.hbm.xml"}); InitData(); } ! [TearDown] ! public override void TearDown() { DeleteData(); - base.TearDown(); } - - #endregion [Test] --- 11,30 ---- public class QueryByExampleTest : TestCase { ! protected override IList Mappings ! { ! get ! { ! return new string[] { "Componentizable.hbm.xml"}; ! } ! } ! protected override void OnSetUp() { InitData(); } ! protected override void OnTearDown() { DeleteData(); } [Test] |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21 Modified Files: Fixture.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: Fixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/Associations/BiM21/Fixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Fixture.cs 5 May 2005 19:27:55 -0000 1.2 --- Fixture.cs 6 May 2005 23:41:18 -0000 1.3 *************** *** 10,44 **** public class Fixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "NHSpecificTest.Docs.Associations.BiM21.Mappings.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() { ! //base.TearDown (); } ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! // only do this at the end of the test fixture ! base.TearDown(); } - #endregion - - [Test] public void TestCorrectUse() --- 10,26 ---- public class Fixture : TestCase { ! protected override string MappingsAssembly { ! get { return "NHibernate.Test"; } } ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecificTest.Docs.Associations.BiM21.Mappings.hbm.xml"}; ! } } [Test] public void TestCorrectUse() |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:57
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/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 SimpleFooBarFixture.cs UnsavedValueFixture.cs UserTypeFixture.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: BasicClassFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BasicClassFixture.cs 5 May 2005 19:27:55 -0000 1.13 --- BasicClassFixture.cs 6 May 2005 23:41:17 -0000 1.14 *************** *** 14,22 **** public class BasicClassFixture : TestCase { ! ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.BasicClass.hbm.xml"}, true ); } --- 14,23 ---- public class BasicClassFixture : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "NHSpecific.BasicClass.hbm.xml"}; ! } } *************** *** 43,46 **** --- 44,49 ---- bc = (BasicClass)s.Load( typeof(BasicClass), (int)1 ); Assert.AreEqual( 5, bc.ValueOfPrivateField, "private field accessor" ); + s.Delete( bc ); + s.Flush(); s.Close(); } *************** *** 665,668 **** --- 668,674 ---- s.Refresh( bc ); Assert.AreEqual( originalCount + 1, bc.StringBag.Count, "was refreshed correctly" ); + + s.Delete( bc ); + s.Flush(); s.Close(); } Index: CollectionFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/CollectionFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CollectionFixture.cs 5 May 2005 19:27:55 -0000 1.2 --- CollectionFixture.cs 6 May 2005 23:41:17 -0000 1.3 *************** *** 13,20 **** public class CollectionFixture : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.LazyLoadBug.hbm.xml"} ); } --- 13,31 ---- public class CollectionFixture : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecific.LazyLoadBug.hbm.xml"}; ! } ! } ! ! protected override void OnTearDown() ! { ! using( ISession session = sessions.OpenSession() ) ! { ! session.Delete( "from LLParent" ); ! session.Flush(); ! } } Index: SimpleComponentFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/SimpleComponentFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleComponentFixture.cs 5 May 2005 19:27:55 -0000 1.3 --- SimpleComponentFixture.cs 6 May 2005 23:41:17 -0000 1.4 *************** *** 7,39 **** namespace NHibernate.Test.NHSpecificTest { - [TestFixture] ! public class SimpleCompenentFixture : TestCase { private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.SimpleComponent.hbm.xml"} ); } ! [Test] ! public void TestLoad() { ! ISession s = OpenSession(); ! ITransaction t = s.BeginTransaction(); - TestInsert(); ! SimpleComponent simpleComp = (SimpleComponent)s.Load(typeof(SimpleComponent), 10); ! Assert.AreEqual(10, simpleComp.Key); ! Assert.AreEqual("TestCreated", simpleComp.Audit.CreatedUserId); ! Assert.AreEqual("TestUpdated", simpleComp.Audit.UpdatedUserId); ! t.Commit(); ! s.Close(); } /// <summary> --- 7,72 ---- namespace NHibernate.Test.NHSpecificTest { [TestFixture] ! public class SimpleComponentFixture : TestCase { private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); + protected override System.Collections.IList Mappings + { + get + { + return new string[] { "NHSpecific.SimpleComponent.hbm.xml"}; + } + } ! protected override void OnSetUp() ! { ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! // create a new ! SimpleComponent simpleComp = new SimpleComponent(); ! simpleComp.Name = "Simple 1"; ! simpleComp.Address = "Street 12"; ! simpleComp.Date = testDateTime; ! simpleComp.Count = 99; ! simpleComp.Audit.CreatedDate = System.DateTime.Now; ! simpleComp.Audit.CreatedUserId = "TestCreated"; ! simpleComp.Audit.UpdatedDate = System.DateTime.Now; ! simpleComp.Audit.UpdatedUserId = "TestUpdated"; ! ! ! s.Save(simpleComp, 10); ! ! t.Commit(); ! } } ! protected override void OnTearDown() ! { ! using( ISession s = OpenSession() ) ! { ! s.Delete( s.Load( typeof( SimpleComponent ), 10 ) ); ! s.Flush(); ! } ! } ! [Test] ! public void TestLoad() ! { ! using( ISession s = OpenSession() ) ! using( ITransaction t = s.BeginTransaction() ) ! { ! SimpleComponent simpleComp = (SimpleComponent)s.Load(typeof(SimpleComponent), 10); ! Assert.AreEqual(10, simpleComp.Key); ! Assert.AreEqual("TestCreated", simpleComp.Audit.CreatedUserId); ! Assert.AreEqual("TestUpdated", simpleComp.Audit.UpdatedUserId); + t.Commit(); + } } /// <summary> *************** *** 42,68 **** /// </summary> [Test] ! public void TestInsert() { ! ! ISession s = OpenSession(); ! ITransaction t = s.BeginTransaction(); ! ! // create a new ! SimpleComponent simpleComp = new SimpleComponent(); ! simpleComp.Name = "Simple 1"; ! simpleComp.Address = "Street 12"; ! simpleComp.Date = testDateTime; ! simpleComp.Count = 99; ! simpleComp.Audit.CreatedDate = System.DateTime.Now; ! simpleComp.Audit.CreatedUserId = "TestCreated"; ! simpleComp.Audit.UpdatedDate = System.DateTime.Now; ! simpleComp.Audit.UpdatedUserId = "TestUpdated"; ! ! ! s.Save(simpleComp, 10); ! ! t.Commit(); ! s.Close(); ! ! } } --- 75,81 ---- /// </summary> [Test] ! public void TestInsert() ! { ! // Do nothing, all the action is in OnSetUp. } } Index: UnsavedValueFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/UnsavedValueFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UnsavedValueFixture.cs 5 May 2005 19:27:55 -0000 1.4 --- UnsavedValueFixture.cs 6 May 2005 23:41:17 -0000 1.5 *************** *** 15,22 **** public static int newId = 0; ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.UnsavedType.hbm.xml"}); } --- 15,24 ---- public static int newId = 0; ! protected override IList Mappings { ! get ! { ! return new string[] { "NHSpecific.UnsavedType.hbm.xml"}; ! } } Index: BasicSerializableFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicSerializableFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BasicSerializableFixture.cs 5 May 2005 19:27:55 -0000 1.2 --- BasicSerializableFixture.cs 6 May 2005 23:41:17 -0000 1.3 *************** *** 16,25 **** [TestFixture] public class BasicSerializableFixture : TestCase ! { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.BasicSerializable.hbm.xml"}, true ); } --- 16,27 ---- [TestFixture] public class BasicSerializableFixture : TestCase ! { ! protected override IList Mappings { ! get ! { ! return new string[] { "NHSpecific.BasicSerializable.hbm.xml"}; ! } } Index: SimpleFooBarFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/SimpleFooBarFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleFooBarFixture.cs 26 Mar 2005 12:18:54 -0000 1.1 --- SimpleFooBarFixture.cs 6 May 2005 23:41:17 -0000 1.2 *************** *** 11,19 **** public class SimpleFooBarFixture : TestCase { ! ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "FooBar.hbm.xml"} ); } --- 11,20 ---- public class SimpleFooBarFixture : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "FooBar.hbm.xml"}; ! } } Index: UserTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/UserTypeFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UserTypeFixture.cs 5 May 2005 19:27:55 -0000 1.2 --- UserTypeFixture.cs 6 May 2005 23:41:17 -0000 1.3 *************** *** 14,22 **** public class UserTypeFixture : TestCase { ! ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.ClassWithNullColumns.hbm.xml"}, true ); } --- 14,23 ---- public class UserTypeFixture : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecific.ClassWithNullColumns.hbm.xml"}; ! } } *************** *** 28,41 **** public void InsertNull() { ! ISession s = OpenSession(); ! ! ClassWithNullColumns userTypeClass = new ClassWithNullColumns(); ! userTypeClass.Id = 5; ! userTypeClass.FirstInt32 = 4; ! userTypeClass.SecondInt32 = 0; // with the user type should set value to null ! s.Save(userTypeClass); ! s.Flush(); ! s.Close(); // manually read from the db --- 29,42 ---- public void InsertNull() { ! using( ISession s = OpenSession() ) ! { ! ClassWithNullColumns userTypeClass = new ClassWithNullColumns(); ! userTypeClass.Id = 5; ! userTypeClass.FirstInt32 = 4; ! userTypeClass.SecondInt32 = 0; // with the user type should set value to null ! s.Save(userTypeClass); ! s.Flush(); ! } // manually read from the db *************** *** 57,60 **** --- 58,67 ---- conn.Close(); + + using( ISession s = OpenSession() ) + { + s.Delete( "from ClassWithNullColumns" ); + s.Flush(); + } } } Index: BasicObjectFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicObjectFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BasicObjectFixture.cs 5 May 2005 19:27:55 -0000 1.4 --- BasicObjectFixture.cs 6 May 2005 23:41:17 -0000 1.5 *************** *** 20,28 **** public class BasicObjectFixture : TestCase { ! ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.BasicObject.hbm.xml"}, true ); } --- 20,29 ---- public class BasicObjectFixture : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecific.BasicObject.hbm.xml"}; ! } } Index: BasicTimeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicTimeFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BasicTimeFixture.cs 5 May 2005 19:27:55 -0000 1.2 --- BasicTimeFixture.cs 6 May 2005 23:41:17 -0000 1.3 *************** *** 14,21 **** public class BasicTimeFixture : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.BasicTime.hbm.xml"}, true ); } --- 14,23 ---- public class BasicTimeFixture : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecific.BasicTime.hbm.xml"}; ! } } Index: NH47Fixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/NH47Fixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NH47Fixture.cs 5 May 2005 19:27:55 -0000 1.3 --- NH47Fixture.cs 6 May 2005 23:41:17 -0000 1.4 *************** *** 15,22 **** public class NH47Fxiture : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.UnsavedType.hbm.xml"}); } --- 15,24 ---- public class NH47Fxiture : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "NHSpecific.UnsavedType.hbm.xml"}; ! } } Index: LazyLoadBugTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/LazyLoadBugTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LazyLoadBugTest.cs 5 May 2005 19:27:55 -0000 1.3 --- LazyLoadBugTest.cs 6 May 2005 23:41:17 -0000 1.4 *************** *** 9,16 **** public class LazyLoadBugTest : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.LazyLoadBug.hbm.xml"} ); } --- 9,18 ---- public class LazyLoadBugTest : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecific.LazyLoadBug.hbm.xml" }; ! } } *************** *** 35,49 **** } ! // try to Load the object to get the exception ! using( ISession s2 = OpenSession() ) ! using( ITransaction t2 = s2.BeginTransaction() ) { ! LLParent parent2 = (LLParent)s2.Load( typeof(LLParent), parentId ); ! // this should throw the exception - the property setter access is not mapped correctly. ! // Because it maintains logic to maintain the collection during the property set it should ! // tell NHibernate to skip the setter and access the field. If it doesn't, then throw ! // a LazyInitializationException. ! int count = parent2.Children.Count; } } --- 37,61 ---- } ! try { ! // try to Load the object to get the exception ! using( ISession s2 = OpenSession() ) ! using( ITransaction t2 = s2.BeginTransaction() ) ! { ! LLParent parent2 = (LLParent)s2.Load( typeof(LLParent), parentId ); ! // this should throw the exception - the property setter access is not mapped correctly. ! // Because it maintains logic to maintain the collection during the property set it should ! // tell NHibernate to skip the setter and access the field. If it doesn't, then throw ! // a LazyInitializationException. ! int count = parent2.Children.Count; ! } ! } ! finally ! { ! // Need to delete the objects using direct SQL in this case, ! // because of loading problems. ! ExecuteStatement( "delete from LLChild" ); ! ExecuteStatement( "delete from LLParent" ); } } *************** *** 76,79 **** --- 88,97 ---- Assert.AreEqual( 1, parent2.ChildrenNoAdd.Count ); } + + using( ISession session = sessions.OpenSession() ) + { + session.Delete( "from LLParent" ); + session.Flush(); + } } } Index: MapFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/MapFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MapFixture.cs 5 May 2005 19:27:55 -0000 1.4 --- MapFixture.cs 6 May 2005 23:41:17 -0000 1.5 *************** *** 12,30 **** /// </summary> [TestFixture] ! public class MapFixture : TestCase { ! private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { ! "NHSpecific.Parent.hbm.xml", ! "NHSpecific.Child.hbm.xml", ! "NHSpecific.SexType.hbm.xml", ! "NHSpecific.Team.hbm.xml" }, true); } [Test] [Ignore("Have not written the Test yet.")] --- 12,47 ---- /// </summary> [TestFixture] ! public class MapFixture : TestCase ! { private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); + protected override IList Mappings + { + get + { + return new string[] + { + "NHSpecific.Parent.hbm.xml", + "NHSpecific.Child.hbm.xml", + "NHSpecific.SexType.hbm.xml", + "NHSpecific.Team.hbm.xml" + }; + } + } ! protected override void OnTearDown() ! { ! using( ISession session = sessions.OpenSession() ) ! { ! session.Delete( "from Team" ); ! session.Delete( "from Child" ); ! session.Delete( "from Parent" ); ! session.Delete( "from SexType" ); ! session.Flush(); ! } } + [Test] [Ignore("Have not written the Test yet.")] *************** *** 52,56 **** Child childOneRef = amyJones.FirstSibling; - t.Commit(); s.Close(); --- 69,72 ---- Index: NodeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/NodeFixture.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NodeFixture.cs 5 May 2005 19:27:55 -0000 1.5 --- NodeFixture.cs 6 May 2005 23:41:17 -0000 1.6 *************** *** 13,24 **** public class NodeFixture : TestCase { ! ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "NHSpecific.Node.hbm.xml"}, true ); } - [Test] public void InsertNodes() --- 13,24 ---- public class NodeFixture : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "NHSpecific.Node.hbm.xml"}; ! } } [Test] public void InsertNodes() *************** *** 133,136 **** --- 133,141 ---- s.Close(); + using( ISession s3 = OpenSession() ) + { + s3.Delete( "from Node" ); + s3.Flush(); + } } Index: GetTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/GetTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GetTest.cs 5 May 2005 19:27:55 -0000 1.4 --- GetTest.cs 6 May 2005 23:41:17 -0000 1.5 *************** *** 9,17 **** public class GetTest : TestCase { ! [SetUp] ! public void SetUp() { ! // A class with a proxy is needed to actually test Get vs Load. ! ExportSchema( new string[] { "ABCProxy.hbm.xml" }, true ); } --- 9,27 ---- public class GetTest : TestCase { ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "ABCProxy.hbm.xml" }; ! } ! } ! ! protected override void OnTearDown() ! { ! using( ISession s = sessions.OpenSession() ) ! { ! s.Delete( "from A" ); ! s.Flush(); ! } } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:55
|
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"}; ! } } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CompositeId In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/CompositeId Modified Files: ClassWithCompositeIdFixture.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: ClassWithCompositeIdFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CompositeId/ClassWithCompositeIdFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClassWithCompositeIdFixture.cs 5 May 2005 19:27:53 -0000 1.2 --- ClassWithCompositeIdFixture.cs 6 May 2005 23:41:16 -0000 1.3 *************** *** 19,31 **** private Id id; private Id secondId; ! ! [SetUp] ! public void SetUp() { - ExportSchema( new string[] { "CompositeId.ClassWithCompositeId.hbm.xml" }, true, "NHibernate.Test" ); id = new Id("stringKey", 3, firstDateTime); secondId = new Id("stringKey2", 5, secondDateTime); } /// <summary> /// Test the basic CRUD operations for a class with a Composite Identifier --- 19,52 ---- private Id id; private Id secondId; ! ! protected override string MappingsAssembly ! { ! get { return "NHibernate.Test"; } ! } ! ! protected override IList Mappings ! { ! get ! { ! return new string[] { "CompositeId.ClassWithCompositeId.hbm.xml" }; ! } ! } ! ! protected override void OnSetUp() { id = new Id("stringKey", 3, firstDateTime); secondId = new Id("stringKey2", 5, secondDateTime); } + protected override void OnTearDown() + { + using( ISession s = sessions.OpenSession() ) + { + s.Delete( "from ClassWithCompositeId" ); + s.Flush(); + } + } + + /// <summary> /// Test the basic CRUD operations for a class with a Composite Identifier *************** *** 207,212 **** s2.Close(); } - - } } --- 228,231 ---- |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:30
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/TypesTest Modified Files: BinaryBlobTypeFixture.cs BinaryTypeFixture.cs BooleanTypeFixture.cs ByteTypeFixture.cs DecimalTypeFixture.cs DoubleTypeFixture.cs GuidTypeFixture.cs StringClobTypeFixture.cs Added Files: TypeFixtureBase.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: DoubleTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/DoubleTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DoubleTypeFixture.cs 5 May 2005 19:28:04 -0000 1.3 --- DoubleTypeFixture.cs 6 May 2005 23:41:20 -0000 1.4 *************** *** 12,30 **** /// </summary> [TestFixture] ! public class DoubleTypeFixture : TestCase { double[] _values = new double[2]; ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() { ! ExportSchema( new string[] { "TypesTest.DoubleClass.hbm.xml"}, true, "NHibernate.Test" ); } ! [SetUp] ! public void SetUp() { if( dialect is Dialect.OracleDialect ) { --- 12,27 ---- /// </summary> [TestFixture] ! public class DoubleTypeFixture : TypeFixtureBase { double[] _values = new double[2]; ! protected override string TypeName { ! get { return "Double"; } } ! protected override void OnSetUp() { + base.OnSetUp (); if( dialect is Dialect.OracleDialect ) { *************** *** 39,56 **** } - [TearDown] - public override void TearDown() - { - // do nothing except not let the base TearDown get called - } - - [TestFixtureTearDown] - public void TestFixtureTearDown() - { - base.TearDown(); - } - - #endregion - /// <summary> /// Verify Equals will correctly determine when the property --- 36,39 ---- Index: BinaryBlobTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/BinaryBlobTypeFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BinaryBlobTypeFixture.cs 5 May 2005 19:28:04 -0000 1.2 --- BinaryBlobTypeFixture.cs 6 May 2005 23:41:20 -0000 1.3 *************** *** 11,46 **** /// </summary> [TestFixture] ! public class BinaryBlobTypeFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.BinaryBlobClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! //base.TearDown (); ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! // only do this at the end of the test fixture ! base.TearDown(); } - #endregion - [Test] public void ReadWrite() --- 11,21 ---- /// </summary> [TestFixture] ! public class BinaryBlobTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "BinaryBlob"; } } [Test] public void ReadWrite() Index: GuidTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/GuidTypeFixture.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GuidTypeFixture.cs 5 May 2005 19:28:04 -0000 1.6 --- GuidTypeFixture.cs 6 May 2005 23:41:20 -0000 1.7 *************** *** 10,44 **** /// </summary> [TestFixture] ! public class GuidTypeFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.GuidClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - /// <summary> /// Verify Equals will correctly determine when the property --- 10,20 ---- /// </summary> [TestFixture] ! public class GuidTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "Guid"; } } /// <summary> /// Verify Equals will correctly determine when the property *************** *** 57,61 **** Assert.IsFalse( type.Equals( lhs, rhs ) ); - } --- 33,36 ---- *************** *** 84,86 **** } } ! } \ No newline at end of file --- 59,61 ---- } } ! } Index: DecimalTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DecimalTypeFixture.cs 5 May 2005 19:28:04 -0000 1.6 --- DecimalTypeFixture.cs 6 May 2005 23:41:20 -0000 1.7 *************** *** 10,45 **** /// </summary> [TestFixture] ! public class DecimalTypeFixture : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.DecimalClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - /// <summary> /// Test that two decimal fields that are exactly equal are returned --- 10,20 ---- /// </summary> [TestFixture] ! public class DecimalTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "Decimal"; } } /// <summary> /// Test that two decimal fields that are exactly equal are returned --- NEW FILE: TypeFixtureBase.cs --- using System; using System.Collections; namespace NHibernate.Test.TypesTest { /// <summary> /// Base class for fixtures testing individual types, created to avoid /// code duplication in derived classes. It assumes that the fixture /// uses mapping file named "(TypeName)Class.hbm.xml" placed in TypesTest /// directory in NHibernate.Test assembly. /// </summary> public abstract class TypeFixtureBase : TestCase { protected abstract string TypeName { get; } protected override string MappingsAssembly { get { return "NHibernate.Test"; } } protected override System.Collections.IList Mappings { get { return new string[] { String.Format( "TypesTest.{0}Class.hbm.xml", TypeName ) }; } } } } Index: BooleanTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/BooleanTypeFixture.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BooleanTypeFixture.cs 5 May 2005 19:28:04 -0000 1.5 --- BooleanTypeFixture.cs 6 May 2005 23:41:20 -0000 1.6 *************** *** 10,44 **** /// </summary> [TestFixture] ! public class BooleanTypeFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.BooleanClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - /// <summary> /// Verify Equals will correctly determine when the property --- 10,20 ---- /// </summary> [TestFixture] ! public class BooleanTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "Boolean"; } } /// <summary> /// Verify Equals will correctly determine when the property Index: ByteTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/ByteTypeFixture.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ByteTypeFixture.cs 5 May 2005 19:28:04 -0000 1.5 --- ByteTypeFixture.cs 6 May 2005 23:41:20 -0000 1.6 *************** *** 10,44 **** /// </summary> [TestFixture] ! public class ByteTypeFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.ByteClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - /// <summary> /// Verify Equals will correctly determine when the property --- 10,20 ---- /// </summary> [TestFixture] ! public class ByteTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "Byte"; } } /// <summary> /// Verify Equals will correctly determine when the property *************** *** 52,56 **** Assert.IsTrue( type.Equals( (byte)5, (byte)5 ) ); Assert.IsFalse( type.Equals( (byte)5, (byte)6 ) ); - } --- 28,31 ---- *************** *** 58,62 **** public void ReadWrite() { - ByteClass basic = new ByteClass(); basic.Id = 1; --- 33,36 ---- Index: BinaryTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/BinaryTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BinaryTypeFixture.cs 5 May 2005 19:28:04 -0000 1.3 --- BinaryTypeFixture.cs 6 May 2005 23:41:20 -0000 1.4 *************** *** 16,52 **** /// </summary> [TestFixture] ! public class BinaryTypeFixture : TestCase { ! ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.BinaryClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! //base.TearDown (); ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! // only do this at the end of the test fixture ! base.TearDown(); } - #endregion - /// <summary> /// Verify Equals will correctly determine when the property --- 16,26 ---- /// </summary> [TestFixture] ! public class BinaryTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "Binary"; } } /// <summary> /// Verify Equals will correctly determine when the property Index: StringClobTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/StringClobTypeFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringClobTypeFixture.cs 5 May 2005 19:28:21 -0000 1.2 --- StringClobTypeFixture.cs 6 May 2005 23:41:20 -0000 1.3 *************** *** 9,44 **** /// </summary> [TestFixture] ! public class StringClobTypeFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "TypesTest.StringClobClass.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! //base.TearDown (); ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! // only do this at the end of the test fixture ! base.TearDown(); } - #endregion - [Test] public void ReadWrite() --- 9,19 ---- /// </summary> [TestFixture] ! public class StringClobTypeFixture : TypeFixtureBase { ! protected override string TypeName { ! get { return "StringClob"; } } [Test] public void ReadWrite() |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/QueryTest Modified Files: NamedParametersFixture.cs PositionalParametersFixture.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: PositionalParametersFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PositionalParametersFixture.cs 6 May 2005 16:01:56 -0000 1.3 --- PositionalParametersFixture.cs 6 May 2005 23:41:19 -0000 1.4 *************** *** 11,43 **** public class PositionalParametersFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test, ExpectedException(typeof(NHibernate.QueryException))] public void TestMissingHQLParameters() --- 11,22 ---- public class PositionalParametersFixture : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml" }; ! } } [Test, ExpectedException(typeof(NHibernate.QueryException))] public void TestMissingHQLParameters() Index: NamedParametersFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NamedParametersFixture.cs 6 May 2005 16:01:55 -0000 1.3 --- NamedParametersFixture.cs 6 May 2005 23:41:19 -0000 1.4 *************** *** 12,44 **** public class NamedParametersFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml"} ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() ! { ! // do nothing except not let the base TearDown get called ! } ! ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test, ExpectedException(typeof(NHibernate.QueryException))] public void TestMissingHQLParameters() --- 12,23 ---- public class NamedParametersFixture : TestCase { ! protected override IList Mappings { ! get ! { ! return new string[] { "Simple.hbm.xml"}; ! } } [Test, ExpectedException(typeof(NHibernate.QueryException))] public void TestMissingHQLParameters() |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ProxyTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/ProxyTest Modified Files: NHibernateProxyHelperFixture.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: NHibernateProxyHelperFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ProxyTest/NHibernateProxyHelperFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NHibernateProxyHelperFixture.cs 5 May 2005 19:28:03 -0000 1.3 --- NHibernateProxyHelperFixture.cs 6 May 2005 23:41:19 -0000 1.4 *************** *** 13,45 **** public class NHibernateProxyHelperFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "ProxyTest.AProxy.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() { ! // do nothing except not let the base TearDown get called } ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! base.TearDown(); } - #endregion - [Test] public void GetClassOfProxy() --- 13,29 ---- public class NHibernateProxyHelperFixture : TestCase { ! protected override string MappingsAssembly { ! get { return "NHibernate.Test"; } } ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "ProxyTest.AProxy.hbm.xml" }; ! } } [Test] public void GetClassOfProxy() |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/ExampleParentChild In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/NHSpecificTest/Docs/ExampleParentChild Modified Files: UpdateFixture.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: UpdateFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/Docs/ExampleParentChild/UpdateFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UpdateFixture.cs 5 May 2005 19:28:02 -0000 1.2 --- UpdateFixture.cs 6 May 2005 23:41:18 -0000 1.3 *************** *** 10,42 **** public class UpdateFixture : TestCase { ! #region NUnit.Framework.TestFixture Members ! ! [TestFixtureSetUp] ! public void TestFixtureSetUp() ! { ! ExportSchema( new string[] { "NHSpecificTest.Docs.ExampleParentChild.Mappings.hbm.xml"}, true, "NHibernate.Test" ); ! } ! ! [SetUp] ! public void SetUp() ! { ! // there are test in here where we don't need to resetup the ! // tables - so only set the tables up once ! } ! ! [TearDown] ! public override void TearDown() { ! //base.TearDown (); } ! [TestFixtureTearDown] ! public void TestFixtureTearDown() { ! // only do this at the end of the test fixture ! base.TearDown(); } - - #endregion [Test] --- 10,25 ---- public class UpdateFixture : TestCase { ! protected override string MappingsAssembly { ! get { return "NHibernate.Test"; } } ! protected override System.Collections.IList Mappings { ! get ! { ! return new string[] { "NHSpecificTest.Docs.ExampleParentChild.Mappings.hbm.xml"}; ! } } [Test] *************** *** 67,70 **** --- 50,60 ---- session.Flush(); session.Close(); + + // Clean up + using( ISession s = OpenSession() ) + { + s.Delete( "from Parent" ); + s.Flush(); + } } } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ProxyInterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/ProxyInterface Modified Files: CastleProxyFixture.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: CastleProxyFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ProxyInterface/CastleProxyFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CastleProxyFixture.cs 5 May 2005 20:46:56 -0000 1.4 --- CastleProxyFixture.cs 6 May 2005 23:41:18 -0000 1.5 *************** *** 12,19 **** public class CastleProxyFixture : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "ProxyInterface.CastleProxyImpl.hbm.xml"}, true, "NHibernate.Test" ); } --- 12,26 ---- public class CastleProxyFixture : TestCase { ! protected override string MappingsAssembly { ! get { return "NHibernate.Test"; } ! } ! ! protected override System.Collections.IList Mappings ! { ! get ! { ! return new string[] { "ProxyInterface.CastleProxyImpl.hbm.xml" }; ! } } *************** *** 84,87 **** --- 91,99 ---- s.Close(); + + s = OpenSession(); + s.Delete( ap ); + s.Flush(); + s.Close(); } |
From: Sergey K. <jus...@us...> - 2005-05-06 23:41:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/Subclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6714/src/NHibernate.Test/Subclass Modified Files: SubclassExtendsFixture.cs SubclassFixture.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: SubclassFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/Subclass/SubclassFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SubclassFixture.cs 5 May 2005 19:28:03 -0000 1.2 --- SubclassFixture.cs 6 May 2005 23:41:19 -0000 1.3 *************** *** 15,23 **** private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); ! ! [SetUp] ! public virtual void SetUp() { ! ExportSchema( new string[] { "Subclass.Subclass.hbm.xml" }, true, "NHibernate.Test" ); } --- 15,30 ---- private DateTime testDateTime = new DateTime(2003, 8, 16); private DateTime updateDateTime = new DateTime(2003, 8, 17); ! ! protected override string MappingsAssembly { ! get { return "NHibernate.Test"; } ! } ! ! protected override IList Mappings ! { ! get ! { ! return new string[] { "Subclass.Subclass.hbm.xml" }; ! } } *************** *** 151,154 **** --- 158,167 ---- Assert.AreEqual( typeof(SubclassOne), list[0].GetType(), "should be one" ); s.Close(); + + s = OpenSession(); + s.Delete( one1 ); + s.Delete( base1 ); + s.Flush(); + s.Close(); } Index: SubclassExtendsFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/Subclass/SubclassExtendsFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SubclassExtendsFixture.cs 10 Dec 2004 16:40:04 -0000 1.1 --- SubclassExtendsFixture.cs 6 May 2005 23:41:19 -0000 1.2 *************** *** 17,32 **** public class SubclassExtendsFixture : SubclassFixture { ! [SetUp] ! public override void SetUp() { ! // order is important! The base classes must be configured before ! // the subclasses. ! ArrayList files = new ArrayList(); ! files.Add( "Subclass.Subclass.Base.hbm.xml" ); ! files.Add( "Subclass.Subclass.One.hbm.xml" ); ! ! ExportSchema( files, true, "NHibernate.Test" ); } - } } --- 17,33 ---- public class SubclassExtendsFixture : SubclassFixture { ! protected override IList Mappings { ! get ! { ! // order is important! The base classes must be configured before ! // the subclasses. ! return new string[] ! { ! "Subclass.Subclass.Base.hbm.xml", ! "Subclass.Subclass.One.hbm.xml" ! }; ! } } } } |
From: Michael D. <mik...@us...> - 2005-05-06 21:07:59
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32702 Modified Files: release-package.bat Log Message: added the vshik property to batch file used for releases. Index: release-package.bat =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/release-package.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** release-package.bat 6 Dec 2004 02:07:25 -0000 1.1 --- release-package.bat 6 May 2005 21:07:51 -0000 1.2 *************** *** 1,2 **** NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:nunit2report.installed=true clean-bin package >release-package.log \ No newline at end of file --- 1,2 ---- NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:vshik.installed=true -D:nunit2report.installed=true clean-bin package >release-package.log \ No newline at end of file |
From: Michael D. <mik...@us...> - 2005-05-06 21:07:03
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32486 Modified Files: release-package.bat Log Message: added the vshik property to batch file used for releases. Index: release-package.bat =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/release-package.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** release-package.bat 27 Nov 2004 18:58:42 -0000 1.1 --- release-package.bat 6 May 2005 21:06:54 -0000 1.2 *************** *** 1,2 **** NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:nunit2report.installed=true clean-bin package >release-package.log \ No newline at end of file --- 1,2 ---- NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log ! NAnt -D:project.config=release -D:sign=true -D:vshik.installed=true -D:nunit2report.installed=true clean-bin package >release-package.log \ No newline at end of file |
From: Michael D. <mik...@us...> - 2005-05-06 16:02:08
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20715/NHibernate.Test/QueryTest Modified Files: NamedParametersFixture.cs PositionalParametersFixture.cs Log Message: Added querysubstitutions so all hql works with mssql. Fixed up some failures in TearDown because of open sessions hanging around. Index: PositionalParametersFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PositionalParametersFixture.cs 5 May 2005 19:28:03 -0000 1.2 --- PositionalParametersFixture.cs 6 May 2005 16:01:56 -0000 1.3 *************** *** 1,11 **** using System; using System.Collections; - using System.Data; - - using NHibernate.Cfg; - using NHibernate.Engine; - using NHibernate.SqlCommand; - using NHibernate.Type; - using NUnit.Framework; --- 1,4 ---- *************** *** 52,62 **** ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); - - IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); - // Set the first property, but not the second - q.SetParameter(0, "Fred"); ! // Try to execute it ! IList list = q.List(); } --- 45,63 ---- ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! try ! { ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); ! // Set the first property, but not the second ! q.SetParameter(0, "Fred"); ! ! // Try to execute it ! IList list = q.List(); ! } ! finally ! { ! t.Rollback(); ! s.Close(); ! } } *************** *** 66,76 **** ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); - - IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); - // Set the second property, but not the first - should give a nice not found at position xxx error - q.SetParameter(1, "Fred"); ! // Try to execute it ! IList list = q.List(); } --- 67,85 ---- ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! try ! { ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); ! // Set the second property, but not the first - should give a nice not found at position xxx error ! q.SetParameter(1, "Fred"); ! ! // Try to execute it ! IList list = q.List(); ! } ! finally ! { ! t.Rollback(); ! s.Close(); ! } } *************** *** 80,90 **** ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); ! // Try to set the third positional parameter ! q.SetParameter(3, "Fred"); ! // Try to execute it ! IList list = q.List(); } --- 89,106 ---- ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! try ! { ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?"); ! // Try to set the third positional parameter ! q.SetParameter(3, "Fred"); ! // Try to execute it ! IList list = q.List(); ! } ! finally ! { ! t.Rollback(); ! s.Close(); ! } } *************** *** 94,104 **** ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count"); ! // Try to set the first property ! q.SetParameter(0, "Fred"); ! // Try to execute it ! IList list = q.List(); } } --- 110,127 ---- ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); ! try ! { ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count"); ! // Try to set the first property ! q.SetParameter(0, "Fred"); ! // Try to execute it ! IList list = q.List(); ! } ! finally ! { ! t.Rollback(); ! s.Close(); ! } } } Index: NamedParametersFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest/NamedParametersFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NamedParametersFixture.cs 5 May 2005 19:28:03 -0000 1.2 --- NamedParametersFixture.cs 6 May 2005 16:01:55 -0000 1.3 *************** *** 1,10 **** using System; using System.Collections; - using System.Data; - - using NHibernate.Cfg; - using NHibernate.Engine; - using NHibernate.SqlCommand; - using NHibernate.Type; using NUnit.Framework; --- 1,4 ---- *************** *** 53,62 **** ITransaction t = s.BeginTransaction(); ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count"); ! // Just set the Name property not the count ! q.SetAnsiString("Name", "Fred"); ! // Try to execute it ! IList list = q.List(); } } --- 47,65 ---- ITransaction t = s.BeginTransaction(); ! try ! { ! ! IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count"); ! // Just set the Name property not the count ! q.SetAnsiString("Name", "Fred"); ! // Try to execute it ! IList list = q.List(); ! } ! finally ! { ! t.Rollback(); ! s.Close(); ! } } } |
From: Michael D. <mik...@us...> - 2005-05-06 16:02:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20715/NHibernate.Test Modified Files: ABCProxyTest.cs App.config hibernate.cfg.xml TestCase.cs Log Message: Added querysubstitutions so all hql works with mssql. Fixed up some failures in TearDown because of open sessions hanging around. Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ABCProxyTest.cs 5 May 2005 19:27:52 -0000 1.17 --- ABCProxyTest.cs 6 May 2005 16:01:54 -0000 1.18 *************** *** 278,281 **** --- 278,282 ---- s.Delete(b); t.Commit(); + s.Close(); } Index: hibernate.cfg.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/hibernate.cfg.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** hibernate.cfg.xml 27 Aug 2004 04:21:22 -0000 1.5 --- hibernate.cfg.xml 6 May 2005 16:01:55 -0000 1.6 *************** *** 9,16 **** <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property> <property name="use_outer_join">true</property> ! <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> <!-- mapping files --> ! <mapping file="ABC.hbm.xml" /> ! <mapping resource="NHibernate.DomainModel.Simple.hbm.xml" assembly="NHibernate.DomainModel" /> </session-factory> --- 9,22 ---- <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property> <property name="use_outer_join">true</property> ! <!-- ! these are different than the values in app.config so I can verify these ! are being picked up ! --> ! <property name="query.substitutions">true 1, false 0, yes 1, no 0</property> <!-- mapping files --> ! <!-- are now optional ! <mapping file="ABC.hbm.xml" /> ! <mapping resource="NHibernate.DomainModel.Simple.hbm.xml" assembly="NHibernate.DomainModel" /> ! --> </session-factory> Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestCase.cs 5 May 2005 19:27:53 -0000 1.15 --- TestCase.cs 6 May 2005 16:01:55 -0000 1.16 *************** *** 4,11 **** using System.Reflection; - using NHibernate.DomainModel; - using NHibernate.Cfg; - using NHibernate.Dialect; using NHibernate.Tool.hbm2ddl; --- 4,8 ---- Index: App.config =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/App.config,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** App.config 1 Mar 2005 16:24:41 -0000 1.11 --- App.config 6 May 2005 16:01:55 -0000 1.12 *************** *** 23,26 **** --- 23,30 ---- value="NHibernate.Connection.DriverConnectionProvider" /> + <add + key="hibernate.query.substitutions" + value="true 1, false 0, yes 'Y', no 'N'" + /> <!-- |
From: Michael D. <mik...@us...> - 2005-05-06 16:02:06
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CfgTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20715/NHibernate.Test/CfgTest Modified Files: ConfigurationFixture.cs Log Message: Added querysubstitutions so all hql works with mssql. Fixed up some failures in TearDown because of open sessions hanging around. Index: ConfigurationFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConfigurationFixture.cs 24 Apr 2005 15:41:58 -0000 1.10 --- ConfigurationFixture.cs 6 May 2005 16:01:55 -0000 1.11 *************** *** 29,33 **** cfg.Configure(); ! Assert.AreEqual( "true 1, false 0, yes 'Y', no 'N'", cfg.Properties[Cfg.Environment.QuerySubstitutions]); Assert.AreEqual( "Server=localhost;initial catalog=nhibernate;User Id=;Password=", cfg.Properties[Cfg.Environment.ConnectionString]); } --- 29,33 ---- cfg.Configure(); ! Assert.AreEqual( "true 1, false 0, yes 1, no 0", cfg.Properties[Cfg.Environment.QuerySubstitutions]); Assert.AreEqual( "Server=localhost;initial catalog=nhibernate;User Id=;Password=", cfg.Properties[Cfg.Environment.ConnectionString]); } *************** *** 72,76 **** cfg.Configure( this.GetType().Assembly, "NHibernate.Test.hibernate.cfg.xml" ); ! Assert.AreEqual( "true 1, false 0, yes 'Y', no 'N'", cfg.Properties[Cfg.Environment.QuerySubstitutions]); Assert.AreEqual( "Server=localhost;initial catalog=nhibernate;User Id=;Password=", cfg.Properties[Cfg.Environment.ConnectionString]); } --- 72,76 ---- cfg.Configure( this.GetType().Assembly, "NHibernate.Test.hibernate.cfg.xml" ); ! Assert.AreEqual( "true 1, false 0, yes 1, no 0", cfg.Properties[Cfg.Environment.QuerySubstitutions]); Assert.AreEqual( "Server=localhost;initial catalog=nhibernate;User Id=;Password=", cfg.Properties[Cfg.Environment.ConnectionString]); } |
From: Michael D. <mik...@us...> - 2005-05-06 16:00:32
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20247/NHibernate Modified Files: nhibernate-mapping-2.0.xsd Log Message: removed propertyAccess simpleType because that broke hbm.xmls files that used a custom implementation of IPropertyAccess Index: nhibernate-mapping-2.0.xsd =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/nhibernate-mapping-2.0.xsd,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** nhibernate-mapping-2.0.xsd 31 Mar 2005 12:40:24 -0000 1.14 --- nhibernate-mapping-2.0.xsd 6 May 2005 16:00:21 -0000 1.15 *************** *** 1,20 **** <xs:schema targetNamespace="urn:nhibernate-mapping-2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:nhibernate-mapping-2.0" elementFormDefault="qualified" attributeFormDefault="unqualified"> - <xs:simpleType name="propertyAccess"> - <xs:annotation> - <xs:documentation>Property access strategies</xs:documentation> - </xs:annotation> - <xs:restriction base="xs:string"> - <xs:enumeration value="property"/> - <xs:enumeration value="field"/> - <xs:enumeration value="field.camelcase"/> - <xs:enumeration value="field.camelcase-underscore"/> - <xs:enumeration value="field.pascalcase-m-underscore"/> - <xs:enumeration value="field.lowercase-underscore"/> - <xs:enumeration value="nosetter.camelcase"/> - <xs:enumeration value="nosetter.camelcase-underscore"/> - <xs:enumeration value="nosetter.pascalcase-m-underscore"/> - <xs:enumeration value="nosetter.lowercase-underscore"/> - </xs:restriction> - </xs:simpleType> <xs:simpleType name="polymorphismType"> <xs:annotation> --- 1,3 ---- *************** *** 59,63 **** <xs:attributeGroup name="baseAssociationAttributes"> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess" use="optional"/> <xs:attribute name="table" type="xs:string" use="optional"/> <xs:attribute name="schema" type="xs:string" use="optional"/> --- 42,46 ---- <xs:attributeGroup name="baseAssociationAttributes"> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string" use="optional"/> <xs:attribute name="table" type="xs:string" use="optional"/> <xs:attribute name="schema" type="xs:string" use="optional"/> *************** *** 99,103 **** </xs:attribute> <xs:attribute name="default-cascade" type="cascadeStyle" use="optional" default="none"/> ! <xs:attribute name="default-access" type="propertyAccess" use="optional" default="property"> <xs:annotation> <xs:documentation> --- 82,86 ---- </xs:attribute> <xs:attribute name="default-cascade" type="cascadeStyle" use="optional" default="none"/> ! <xs:attribute name="default-access" type="xs:string" use="optional" default="property"> <xs:annotation> <xs:documentation> *************** *** 193,197 **** </xs:sequence> <xs:attribute name="name" type="xs:string"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> --- 176,180 ---- </xs:sequence> <xs:attribute name="name" type="xs:string"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> *************** *** 217,221 **** <xs:attribute name="class" type="xs:string"/> <xs:attribute name="name" type="xs:string"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="unsaved-value" type="unsavedValueType" default="none"/> </xs:complexType> --- 200,204 ---- <xs:attribute name="class" type="xs:string"/> <xs:attribute name="name" type="xs:string"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="unsaved-value" type="unsavedValueType" default="none"/> </xs:complexType> *************** *** 246,250 **** <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="type" type="xs:string" default="Int32"/> --- 229,233 ---- <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="type" type="xs:string" default="Int32"/> *************** *** 262,266 **** <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="unsaved-value" type="xs:string" default="null"> --- 245,249 ---- <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> <xs:attribute name="unsaved-value" type="xs:string" default="null"> *************** *** 347,351 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> --- 330,334 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> *************** *** 382,386 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="cascade" type="cascadeStyle" default="none"/> <xs:attribute name="meta-type" type="xs:string"/> --- 365,369 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="cascade" type="cascadeStyle" default="none"/> <xs:attribute name="meta-type" type="xs:string"/> *************** *** 404,408 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> --- 387,391 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> *************** *** 454,458 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="update" type="xs:boolean" default="true"/> --- 437,441 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="update" type="xs:boolean" default="true"/> *************** *** 519,523 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> --- 502,506 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> *************** *** 585,589 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> --- 568,572 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> *************** *** 597,601 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> --- 580,584 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> *************** *** 631,635 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> --- 614,618 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="column" type="xs:string"/> *************** *** 662,666 **** <xs:attribute name="class" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess" use="optional"/> </xs:complexType> </xs:element> --- 645,649 ---- <xs:attribute name="class" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string" use="optional"/> </xs:complexType> </xs:element> *************** *** 676,680 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="cascade" type="cascadeStyle"/> --- 659,663 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="cascade" type="cascadeStyle"/> *************** *** 705,709 **** </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="propertyAccess"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> --- 688,692 ---- </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> ! <xs:attribute name="access" type="xs:string"/> <xs:attribute name="table" type="xs:string"/> <xs:attribute name="schema" type="xs:string"/> |