From: Michael D. <mik...@us...> - 2005-05-03 14:56:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23265/NHibernate.Test Modified Files: FooBarTest.cs Log Message: updated with fix of NH-239. NH now correctly infers PersistentEnumTypes and can use it in a ctor for a query result. Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** FooBarTest.cs 30 Apr 2005 21:40:36 -0000 1.94 --- FooBarTest.cs 3 May 2005 14:56:06 -0000 1.95 *************** *** 3887,3890 **** --- 3887,3897 ---- s.Close(); + // verify an enum can be in the ctor + s = sessions.OpenSession(); + IList list = s.Find("select new Result(foo.String, foo.Long, foo.Integer, foo.Status) from foo in class Foo" ); + Assert.AreEqual( 1, list.Count, "Should have found foo" ); + Assert.AreEqual( FooStatus.ON, ((Result)list[0]).Status, "verifying enum set in ctor - should have been ON" ); + s.Close(); + s = sessions.OpenSession(); foo = (FooProxy)s.Load( typeof(Foo), id ); |