From: <fab...@us...> - 2009-07-05 22:37:06
|
Revision: 4587 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4587&view=rev Author: fabiomaulo Date: 2009-07-05 22:37:05 +0000 (Sun, 05 Jul 2009) Log Message: ----------- Forgotten file Added Paths: ----------- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1867/AddMappingTest.cs Added: branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1867/AddMappingTest.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1867/AddMappingTest.cs (rev 0) +++ branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1867/AddMappingTest.cs 2009-07-05 22:37:05 UTC (rev 4587) @@ -0,0 +1,56 @@ +using NHibernate.Cfg; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1867 +{ + [TestFixture] + public class AddMappingTest + { + private const string mappingTemplate = +@"<?xml version='1.0' encoding='utf-8' ?> +<hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' auto-import='true'> + <class name='{0},NHibernate.Test'> + <id name='Id' column='Id' type='string'> + <generator class='assigned' /> + </id> + </class> + <class name='{1},NHibernate.Test'> + <id name='OwnerId' column='Id' type='string'> + <generator class='assigned' /> + </id> + </class> +</hibernate-mapping>"; + + private class A + { + private string Id { get; set; } + public class B + { + private string OwnerId { get; set; } + } + } + + private class A<T> + { + private string Id { get; set; } + public class B + { + private string OwnerId { get; set; } + } + } + + [Test] + public void NestedWithinNonGeneric() + { + var configuration = new Configuration().Configure(); + configuration.AddXml(string.Format(mappingTemplate, typeof(A).FullName, typeof(A.B).FullName)); + } + + [Test] + public void NestedWithinGeneric() + { + var configuration = new Configuration().Configure(); + configuration.AddXml(string.Format(mappingTemplate, typeof(A<int>).FullName, typeof(A<int>.B).FullName)); + } + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |