From: Michael D. <mik...@us...> - 2004-12-10 16:40:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14749/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj NHibernate.Test.build ObjectAssertion.cs TestCase.cs Log Message: NH-131: Describe joined-subclasses and subclasses in seperate files. Also refactored the test a little bit. Going to being moving away from the NHibernate.DomainModel and just include everything in the TestFixture. Making the domain classes smaller and easier to demonstrate the conepts. Borrowed some of the ideas from hibernate 3 Index: NHibernate.Test.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test.build,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NHibernate.Test.build 8 Dec 2004 15:30:55 -0000 1.12 --- NHibernate.Test.build 10 Dec 2004 16:40:02 -0000 1.13 *************** *** 60,64 **** <resources prefix="NHibernate.Test" dynamicprefix="true"> ! <includes name="hibernate.cfg.xml" /> </resources> --- 60,65 ---- <resources prefix="NHibernate.Test" dynamicprefix="true"> ! <includes name="**/*.xml" /> ! <excludes name="bin/**/*.xml" /> </resources> Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestCase.cs 7 Jun 2004 20:35:44 -0000 1.12 --- TestCase.cs 10 Dec 2004 16:40:02 -0000 1.13 *************** *** 1,8 **** using System; ! using System.Reflection; using System.Data; ! using System.Data.SqlClient; using NHibernate.DomainModel; using NHibernate.Cfg; using NHibernate.Dialect; --- 1,9 ---- using System; ! using System.Collections; using System.Data; ! using System.Reflection; using NHibernate.DomainModel; + using NHibernate.Cfg; using NHibernate.Dialect; *************** *** 35,50 **** } ! public void ExportSchema(string[] files) { ExportSchema(files, true); } ! public void ExportSchema(string[] files, bool exportSchema) { cfg = new Configuration(); ! for (int i=0; i<files.Length; i++) { ! cfg.AddResource("NHibernate.DomainModel." + files[i], Assembly.Load("NHibernate.DomainModel")); } --- 36,56 ---- } ! public void ExportSchema(IList files) { ExportSchema(files, true); } ! public void ExportSchema(IList files, bool exportSchema) ! { ! ExportSchema( files, exportSchema, "NHibernate.DomainModel" ); ! } ! ! public void ExportSchema(IList files, bool exportSchema, string assemblyName) { cfg = new Configuration(); ! for (int i=0; i<files.Count; i++) { ! cfg.AddResource( assemblyName + "." + files[i].ToString(), Assembly.Load( assemblyName ) ); } Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** NHibernate.Test-1.1.csproj 21 Nov 2004 22:54:56 -0000 1.51 --- NHibernate.Test-1.1.csproj 10 Dec 2004 16:40:02 -0000 1.52 *************** *** 311,314 **** --- 311,360 ---- /> <File + RelPath = "JoinedSubclass\Address.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "JoinedSubclass\Customer.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "JoinedSubclass\Employee.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclass.Customer.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclass.Employee.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclass.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclass.Person.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclassExtendsFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "JoinedSubclass\JoinedSubclassFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "JoinedSubclass\Person.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "MappingTest\TableFixture.cs" SubType = "Code" *************** *** 356,364 **** /> <File - RelPath = "NHSpecificTest\JoinedSubclassFixture.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "NHSpecificTest\MapFixture.cs" SubType = "Code" --- 402,405 ---- *************** *** 381,389 **** /> <File - RelPath = "NHSpecificTest\SubclassFixture.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "NHSpecificTest\UnsavedValueFixture.cs" SubType = "Code" --- 422,425 ---- *************** *** 501,504 **** --- 537,577 ---- /> <File + RelPath = "Subclass\Subclass.Base.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Subclass\Subclass.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Subclass\Subclass.One.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Subclass\SubclassAssert.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Subclass\SubclassBase.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Subclass\SubclassExtendsFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Subclass\SubclassFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Subclass\SubclassOne.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "TypesTest\BaseTypeFixture.cs" SubType = "Code" Index: ObjectAssertion.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ObjectAssertion.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ObjectAssertion.cs 18 Nov 2004 02:46:59 -0000 1.6 --- ObjectAssertion.cs 10 Dec 2004 16:40:02 -0000 1.7 *************** *** 3,6 **** --- 3,7 ---- using NUnit.Framework; + using NHibernate.DomainModel; using NHibernate.DomainModel.NHSpecific; *************** *** 18,35 **** } - internal static void AssertPropertiesEqual(JoinedSubclassBase expected, JoinedSubclassBase actual) - { - Assert.AreEqual(expected.Id, actual.Id); - Assert.AreEqual(expected.TestDateTime, actual.TestDateTime); - Assert.AreEqual(expected.TestLong, actual.TestLong); - Assert.AreEqual(expected.TestString, actual.TestString); - } - - internal static void AssertPropertiesEqual(JoinedSubclassOne expected, JoinedSubclassOne actual) - { - ObjectAssert.AssertPropertiesEqual((JoinedSubclassBase)expected, (JoinedSubclassBase)actual); - Assert.AreEqual(expected.OneTestLong, actual.OneTestLong); - } - internal static void AssertEquals(Iesi.Collections.ISet expected, Iesi.Collections.ISet actual) { --- 19,22 ---- |