|
From: <fab...@us...> - 2009-05-14 14:53:01
|
Revision: 4302
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4302&view=rev
Author: fabiomaulo
Date: 2009-05-14 14:52:56 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Passing test
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Fixture.cs
trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
Added Paths:
-----------
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Mappings.hbm.xml
Removed Paths:
-------------
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Person.hbm.xml
Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Fixture.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Fixture.cs 2009-05-14 14:44:13 UTC (rev 4301)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Fixture.cs 2009-05-14 14:52:56 UTC (rev 4302)
@@ -1,28 +1,11 @@
-using System;
-using System.Collections;
-using NUnit.Framework;
+using NUnit.Framework;
+using System.Collections.Generic;
namespace NHibernate.Test.NHSpecificTest.NH1773
{
[TestFixture]
public class Fixture : BugTestCase
{
- protected override void Configure(NHibernate.Cfg.Configuration configuration)
- {
- base.Configure(configuration);
- configuration.SetProperty(NHibernate.Cfg.Environment.QueryTranslator, typeof(NHibernate.Hql.Classic.ClassicQueryTranslatorFactory).AssemblyQualifiedName);
- }
-
- protected override string MappingsAssembly
- {
- get { return "NHibernate.Test"; }
- }
-
- protected override IList Mappings
- {
- get { return new[] { "NHSpecificTest.NH1773.Person.hbm.xml"}; }
- }
-
[Test]
public void CustomHQLFunctionsShouldBeRecognizedByTheParser()
{
@@ -41,10 +24,10 @@
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
- IList result = s.CreateQuery("select new PersonResult(p, current_timestamp()) from Person p left join fetch p.Country").List();
+ IList<PersonResult> result = s.CreateQuery("select new PersonResult(p, current_timestamp()) from Person p left join fetch p.Country").List<PersonResult>();
- Assert.AreEqual("My Name", ((PersonResult)result[0]).Person.Name);
- Assert.IsTrue(NHibernateUtil.IsInitialized(((PersonResult)result[0]).Person.Country));
+ Assert.AreEqual("My Name", result[0].Person.Name);
+ Assert.IsTrue(NHibernateUtil.IsInitialized(result[0].Person.Country));
tx.Commit();
}
}
@@ -54,8 +37,8 @@
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
- s.Delete("from Person");
- s.Delete("from Country");
+ s.CreateQuery("delete from Person").ExecuteUpdate();
+ s.CreateQuery("delete from Country").ExecuteUpdate();
tx.Commit();
}
}
Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Mappings.hbm.xml (from rev 4300, trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Person.hbm.xml)
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Mappings.hbm.xml (rev 0)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Mappings.hbm.xml 2009-05-14 14:52:56 UTC (rev 4302)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH1773">
+ <import class="PersonResult" />
+ <class name="Person" table="Person">
+ <id name="Id" column="id" unsaved-value="0">
+ <generator class="assigned" />
+ </id>
+ <property name="Name" column="Name" />
+ <property name="Age" column="Age" />
+ <many-to-one name="Country" class="Country" column="CountryId" />
+ </class>
+
+ <class name="Country" table="Country">
+ <id name="Id" column="Id" unsaved-value="0">
+ <generator class="assigned" />
+ </id>
+ <property name="Name" column="Name" />
+ </class>
+</hibernate-mapping>
\ No newline at end of file
Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Person.hbm.xml
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Person.hbm.xml 2009-05-14 14:44:13 UTC (rev 4301)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1773/Person.hbm.xml 2009-05-14 14:52:56 UTC (rev 4302)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH1773">
- <import class="PersonResult" />
- <class name="Person" table="Person">
- <id name="Id" column="id" unsaved-value="0">
- <generator class="assigned" />
- </id>
- <property name="Name" column="Name" />
- <property name="Age" column="Age" />
- <many-to-one name="Country" class="Country" column="CountryId" />
- </class>
-
- <class name="Country" table="Country">
- <id name="Id" column="Id" unsaved-value="0">
- <generator class="assigned" />
- </id>
- <property name="Name" column="Name" />
- </class>
-</hibernate-mapping>
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-05-14 14:44:13 UTC (rev 4301)
+++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-05-14 14:52:56 UTC (rev 4302)
@@ -1775,7 +1775,7 @@
<EmbeddedResource Include="BulkManipulation\SimpleClass.hbm.xml" />
<EmbeddedResource Include="Ado\VerySimple.hbm.xml" />
<Content Include="DynamicEntity\package.html" />
- <EmbeddedResource Include="NHSpecificTest\NH1773\Person.hbm.xml" />
+ <EmbeddedResource Include="NHSpecificTest\NH1773\Mappings.hbm.xml" />
<EmbeddedResource Include="NHSpecificTest\NH1760\Mappings.hbm.xml" />
<EmbeddedResource Include="MappingTest\Wicked.hbm.xml" />
<EmbeddedResource Include="NHSpecificTest\NH1393\Mappings.hbm.xml" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|