From: <fab...@us...> - 2008-07-25 22:58:46
|
Revision: 3670 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3670&view=rev Author: fabiomaulo Date: 2008-07-25 22:58:54 +0000 (Fri, 25 Jul 2008) Log Message: ----------- - Update NUnit to 2.4.8 - Added forgotten test (NH1304) Modified Paths: -------------- trunk/nhibernate/lib/net/2.0/nunit.core.dll trunk/nhibernate/lib/net/2.0/nunit.framework.dll trunk/nhibernate/lib/net/2.0/nunit.framework.license.txt trunk/nhibernate/src/NHibernate.Test/Assertions/HaveSerializableAttributeAsserter.cs trunk/nhibernate/src/NHibernate.Test/Assertions/InheritedAreMarkedSerializable.cs trunk/nhibernate/src/NHibernate.Test/Assertions/IsSerializable.cs trunk/nhibernate/src/NHibernate.Test/HQLFunctionTest/HQLFunctions.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test-2.0.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Mappings.hbm.xml Modified: trunk/nhibernate/lib/net/2.0/nunit.framework.license.txt =================================================================== --- trunk/nhibernate/lib/net/2.0/nunit.framework.license.txt 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/lib/net/2.0/nunit.framework.license.txt 2008-07-25 22:58:54 UTC (rev 3670) @@ -1,5 +1,6 @@ -Copyright \xA9 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole -Copyright \xA9 2000-2003 Philip A. Craig +Copyright \xA9 2002-2007 Charlie Poole +Copyright \xA9 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov +Copyright \xA9 2000-2002 Philip A. Craig This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. @@ -7,8 +8,8 @@ 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. -Portions Copyright \xA9 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole or Copyright \xA9 2000-2003 Philip A. Craig +Portions Copyright \xA9 2002-2007 Charlie Poole or Copyright \xA9 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright \xA9 2000-2002 Philip A. Craig 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. \ No newline at end of file +3. This notice may not be removed or altered from any source distribution. Modified: trunk/nhibernate/src/NHibernate.Test/Assertions/HaveSerializableAttributeAsserter.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Assertions/HaveSerializableAttributeAsserter.cs 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/src/NHibernate.Test/Assertions/HaveSerializableAttributeAsserter.cs 2008-07-25 22:58:54 UTC (rev 3670) @@ -30,9 +30,9 @@ get { if (clazz.IsInterface) - FailureMessage.AddLine(string.Format("The class {0} is an interface.", clazz.FullName)); + FailureMessage.WriteLine(string.Format("The class {0} is an interface.", clazz.FullName)); else - FailureMessage.AddLine(string.Format("The class {0} is not marked as Serializable.", clazz.FullName)); + FailureMessage.WriteLine(string.Format("The class {0} is not marked as Serializable.", clazz.FullName)); return FailureMessage.ToString(); } } Modified: trunk/nhibernate/src/NHibernate.Test/Assertions/InheritedAreMarkedSerializable.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Assertions/InheritedAreMarkedSerializable.cs 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/src/NHibernate.Test/Assertions/InheritedAreMarkedSerializable.cs 2008-07-25 22:58:54 UTC (rev 3670) @@ -25,7 +25,7 @@ object[] atts = tp.GetCustomAttributes(typeof(SerializableAttribute), false); if (atts.Length == 0) { - FailureMessage.AddLine(string.Format(" class {0} is not marked as Serializable", tp.FullName)); + FailureMessage.WriteLine(string.Format(" class {0} is not marked as Serializable", tp.FullName)); failedCount++; } } Modified: trunk/nhibernate/src/NHibernate.Test/Assertions/IsSerializable.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Assertions/IsSerializable.cs 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/src/NHibernate.Test/Assertions/IsSerializable.cs 2008-07-25 22:58:54 UTC (rev 3670) @@ -25,7 +25,7 @@ } catch (SerializationException e) { - FailureMessage.AddLine(string.Format("class {0} is not serializable: {1}", obj.GetType().FullName, e.Message)); + FailureMessage.WriteLine(string.Format("class {0} is not serializable: {1}", obj.GetType().FullName, e.Message)); result = false; } return result; Modified: trunk/nhibernate/src/NHibernate.Test/HQLFunctionTest/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQLFunctionTest/HQLFunctions.cs 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/src/NHibernate.Test/HQLFunctionTest/HQLFunctions.cs 2008-07-25 22:58:54 UTC (rev 3670) @@ -534,13 +534,13 @@ hql = "select cast(a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3D, l[0]); + Assert.AreEqual(1.3f, l[0]); // Rendered in SELECT using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7D + 123D - 5D * 1.3D, l[0]); + Assert.AreEqual(7f + 123f - 5f * 1.3f, l[0]); // Rendered in SELECT using a property and nested functions hql = "select cast(cast(a.BodyWeight as string) as Double) from Animal a"; @@ -569,13 +569,13 @@ hql = "select cast(a.BodyWeight as Double) from Animal a group by cast(a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3D, l[0]); + Assert.AreEqual(1.3f, l[0]); // Rendered in GROUP BY using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7D + 123D - 5D * 1.3D, l[0]); + Assert.AreEqual(7f + 123f - 5f * 1.3f, l[0]); // Rendered in GROUP BY using a property and nested functions hql = "select cast(cast(a.BodyWeight as string) as Double) from Animal a group by cast(cast(a.BodyWeight as string) as Double)"; @@ -587,7 +587,7 @@ hql = "select cast(a.BodyWeight as Double) from Animal a group by cast(a.BodyWeight as Double) having cast(a.BodyWeight as Double)>0"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(1.3D, l[0]); + Assert.AreEqual(1.3f, l[0]); // Rendered in HAVING using a property in an operation with costants hql = "select cast(7+123.3-1*a.BodyWeight as int) from Animal a group by cast(7+123.3-1*a.BodyWeight as int) having cast(7+123.3-1*a.BodyWeight as int)>0"; Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Fixture.cs 2008-07-25 22:58:54 UTC (rev 3670) @@ -0,0 +1,28 @@ +using System.Text; +using log4net.Core; +using NHibernate.Tuple.Entity; +using NUnit.Framework; +namespace NHibernate.Test.NHSpecificTest.NH1304 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void BuildSessionFactory() + { + using (LogSpy ls = new LogSpy(typeof (AbstractEntityTuplizer))) + { + base.BuildSessionFactory(); + StringBuilder wholeMessage = new StringBuilder(); + foreach (LoggingEvent loggingEvent in ls.Appender.GetEvents()) + { + string singleMessage = loggingEvent.RenderedMessage; + if (singleMessage.IndexOf("AbstractEntityTuplizer") > 0) + Assert.Greater(singleMessage.IndexOf("No custom accessors found"), -1); + wholeMessage.Append(singleMessage); + } + string logs = wholeMessage.ToString(); + Assert.AreEqual(-1, logs.IndexOf("Custom accessors found")); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1304/Mappings.hbm.xml 2008-07-25 22:58:54 UTC (rev 3670) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH1304" + assembly="NHibernate.Test"> + + <class name="Funny"> + <id name="Id"> + <generator class="native"/> + </id> + <property name="field" access="field"/> + <property name="FieldCamelcase" access="field.camelcase"/> + <property name="FieldCamelcaseUnderscore" access="field.camelcase-underscore"/> + <property name="FieldLowercase" access="field.lowercase"/> + <property name="FieldLowercaseUnderscore" access="field.lowercase-underscore"/> + <property name="FieldPascalcaseUnderscore" access="field.pascalcase-underscore"/> + <property name="FieldPascalcaseMUnderscore" access="field.pascalcase-m-underscore"/> + <property name="FieldPascalcaseM" access="field.pascalcase-m"/> + <property name="NosetterCamelcase" access="nosetter.camelcase"/> + <property name="NosetterCamelcaseUnderscore" access="nosetter.camelcase-underscore"/> + <property name="NosetterLowercase" access="nosetter.lowercase"/> + <property name="NosetterLowercaseUnderscore" access="nosetter.lowercase-underscore"/> + <property name="NosetterPascalcaseUnderscore" access="nosetter.pascalcase-underscore"/> + <property name="NosetterPascalcaseMUnderscore" access="nosetter.pascalcase-m-underscore"/> + <property name="NosetterPascalcase" access="nosetter.pascalcase-m"/> + </class> +</hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test-2.0.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test-2.0.csproj 2008-07-25 19:46:18 UTC (rev 3669) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test-2.0.csproj 2008-07-25 22:58:54 UTC (rev 3670) @@ -382,6 +382,8 @@ <Compile Include="NHSpecificTest\NH1301\Fixture.cs"> <SubType>Code</SubType> </Compile> + <Compile Include="NHSpecificTest\NH1304\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1304\Funny.cs" /> <Compile Include="NHSpecificTest\NH1313\A.cs" /> <Compile Include="NHSpecificTest\NH1313\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1324\Fixture.cs" /> @@ -1389,6 +1391,7 @@ <EmbeddedResource Include="Any\Person.hbm.xml" /> <EmbeddedResource Include="Any\Properties.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1304\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1408\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1393\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1394\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |