From: <fab...@us...> - 2010-09-25 20:07:36
|
Revision: 5219 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5219&view=rev Author: fabiomaulo Date: 2010-09-25 20:07:30 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Lazy-property was implemented the feature is now supported. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/LazyOneToOne/LazyOneToOneTest.cs Modified: trunk/nhibernate/src/NHibernate.Test/LazyOneToOne/LazyOneToOneTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/LazyOneToOne/LazyOneToOneTest.cs 2010-09-25 18:06:13 UTC (rev 5218) +++ trunk/nhibernate/src/NHibernate.Test/LazyOneToOne/LazyOneToOneTest.cs 2010-09-25 20:07:30 UTC (rev 5219) @@ -6,7 +6,7 @@ namespace NHibernate.Test.LazyOneToOne { - [TestFixture, Ignore("Not supported.")] + [TestFixture] public class LazyOneToOneTest : TestCase { protected override IList Mappings @@ -19,15 +19,17 @@ get { return "NHibernate.Test"; } } - protected override bool AppliesTo(Dialect.Dialect dialect) - { - // this test work only with Field interception (NH-1618) - return FieldInterceptionHelper.IsInstrumented( new Person() ); - } + //protected override bool AppliesTo(Dialect.Dialect dialect) + //{ + // // this test work only with Field interception (NH-1618) + // return FieldInterceptionHelper.IsInstrumented( new Person() ); + //} protected override void Configure(Cfg.Configuration configuration) { - cfg.SetProperty(Environment.MaxFetchDepth, "2"); - cfg.SetProperty(Environment.UseSecondLevelCache, "false"); + configuration.SetProperty(Environment.ProxyFactoryFactoryClass, + typeof(NHibernate.ByteCode.Castle.ProxyFactoryFactory).AssemblyQualifiedName); + configuration.SetProperty(Environment.MaxFetchDepth, "2"); + configuration.SetProperty(Environment.UseSecondLevelCache, "false"); } protected override string CacheConcurrencyStrategy @@ -53,7 +55,7 @@ s = OpenSession(); t = s.BeginTransaction(); p = s.CreateQuery("from Person where name='Gavin'").UniqueResult<Person>(); - //Assert.That(!NHibernateUtil.IsPropertyInitialized(p, "Employee")); + Assert.That(!NHibernateUtil.IsPropertyInitialized(p, "Employee")); Assert.That(p.Employee.Person, Is.SameAs(p)); Assert.That(NHibernateUtil.IsInitialized(p.Employee.Employments)); @@ -67,7 +69,7 @@ s = OpenSession(); t = s.BeginTransaction(); p = s.Get<Person>("Gavin"); - //Assert.That(!NHibernateUtil.IsPropertyInitialized(p, "Employee")); + Assert.That(!NHibernateUtil.IsPropertyInitialized(p, "Employee")); Assert.That(p.Employee.Person, Is.SameAs(p)); Assert.That(NHibernateUtil.IsInitialized(p.Employee.Employments)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |