You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fab...@us...> - 2009-05-25 22:27:07
|
Revision: 4388 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4388&view=rev Author: fabiomaulo Date: 2009-05-25 22:26:28 +0000 (Mon, 25 May 2009) Log Message: ----------- Refactoring (common AbstractProxyFactory) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Proxy/AbstractProxyFactory.cs Removed Paths: ------------- trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-05-25 22:26:28 UTC (rev 4388) @@ -598,6 +598,7 @@ <Compile Include="Hql\Ast\ANTLR\Util\LiteralProcessor.cs" /> <Compile Include="Hql\Ast\ANTLR\Util\NodeTraverser.cs" /> <Compile Include="Param\VersionTypeSeedParameterSpecification.cs" /> + <Compile Include="Proxy\AbstractProxyFactory.cs" /> <Compile Include="SqlCommand\InsertSelect.cs" /> <Compile Include="Transaction\AdoNetWithDistrubtedTransactionFactory.cs" /> <Compile Include="Transform\ToListResultTransformer.cs" /> Added: trunk/nhibernate/src/NHibernate/Proxy/AbstractProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Proxy/AbstractProxyFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Proxy/AbstractProxyFactory.cs 2009-05-25 22:26:28 UTC (rev 4388) @@ -0,0 +1,46 @@ +using System.Reflection; +using Iesi.Collections.Generic; +using NHibernate.Engine; +using NHibernate.Type; + +namespace NHibernate.Proxy +{ + /// <summary> + /// Convenient common implementation for ProxyFactory + /// </summary> + public abstract class AbstractProxyFactory: IProxyFactory + { + protected virtual string EntityName { get; private set; } + protected virtual System.Type PersistentClass { get; private set; } + protected virtual System.Type[] Interfaces { get; private set; } + protected virtual MethodInfo GetIdentifierMethod { get; private set; } + protected virtual MethodInfo SetIdentifierMethod { get; private set; } + protected virtual IAbstractComponentType ComponentIdType { get; private set; } + + protected bool IsClassProxy + { + get { return Interfaces.Length == 1; } + } + + public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, + MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, + IAbstractComponentType componentIdType) + { + EntityName = entityName; + PersistentClass = persistentClass; + Interfaces = new System.Type[interfaces.Count]; + + if (interfaces.Count > 0) + { + interfaces.CopyTo(Interfaces, 0); + } + + GetIdentifierMethod = getIdentifierMethod; + SetIdentifierMethod = setIdentifierMethod; + ComponentIdType = componentIdType; + } + + + public abstract INHibernateProxy GetProxy(object id, ISessionImplementor session); + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactory.cs 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactory.cs 2009-05-25 22:26:28 UTC (rev 4388) @@ -1,95 +1,37 @@ using System; -using System.Reflection; using Castle.DynamicProxy; -using Iesi.Collections.Generic; using log4net; using NHibernate.Engine; using NHibernate.Proxy; -using NHibernate.Type; namespace NHibernate.ByteCode.Castle { - public class ProxyFactory : IProxyFactory + public class ProxyFactory : AbstractProxyFactory { protected static readonly ILog log = LogManager.GetLogger(typeof (ProxyFactory)); - private static readonly ProxyGenerator _proxyGenerator = new ProxyGenerator(); + private static readonly ProxyGenerator ProxyGenerator = new ProxyGenerator(); - private System.Type _persistentClass; - private System.Type[] _interfaces; - private MethodInfo _getIdentifierMethod; - private MethodInfo _setIdentifierMethod; - private string _entityName; - private IAbstractComponentType _componentIdType; - - public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, - MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, - IAbstractComponentType componentIdType) - { - _entityName = entityName; - _persistentClass = persistentClass; - _interfaces = new System.Type[interfaces.Count]; - interfaces.CopyTo(_interfaces, 0); - _getIdentifierMethod = getIdentifierMethod; - _setIdentifierMethod = setIdentifierMethod; - _componentIdType = componentIdType; - } - protected static ProxyGenerator DefaultProxyGenerator { - get { return _proxyGenerator; } + get { return ProxyGenerator; } } - protected System.Type PersistentClass - { - get { return _persistentClass; } - } - - protected System.Type[] Interfaces - { - get { return _interfaces; } - } - - protected MethodInfo GetIdentifierMethod - { - get { return _getIdentifierMethod; } - } - - protected MethodInfo SetIdentifierMethod - { - get { return _setIdentifierMethod; } - } - - protected bool IsClassProxy - { - get { return _interfaces.Length == 1; } - } - - public string EntityName - { - get { return _entityName; } - } - - public IAbstractComponentType ComponentIdType - { - get { return _componentIdType; } - } - /// <summary> /// Build a proxy using the Castle.DynamicProxy library. /// </summary> /// <param name="id">The value for the Id.</param> /// <param name="session">The Session the proxy is in.</param> /// <returns>A fully built <c>INHibernateProxy</c>.</returns> - public virtual INHibernateProxy GetProxy(object id, ISessionImplementor session) + public override INHibernateProxy GetProxy(object id, ISessionImplementor session) { try { - var initializer = new LazyInitializer(EntityName, _persistentClass, id, _getIdentifierMethod, - _setIdentifierMethod, ComponentIdType, session); + var initializer = new LazyInitializer(EntityName, PersistentClass, id, GetIdentifierMethod, + SetIdentifierMethod, ComponentIdType, session); object generatedProxy = IsClassProxy - ? _proxyGenerator.CreateClassProxy(_persistentClass, _interfaces, initializer) - : _proxyGenerator.CreateInterfaceProxyWithoutTarget(_interfaces[0], _interfaces, + ? ProxyGenerator.CreateClassProxy(PersistentClass, Interfaces, initializer) + : ProxyGenerator.CreateInterfaceProxyWithoutTarget(Interfaces[0], Interfaces, initializer); initializer._constructed = true; Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactory.cs 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactory.cs 2009-05-25 22:26:28 UTC (rev 4388) @@ -1,57 +1,19 @@ using System; -using System.Reflection; -using Iesi.Collections.Generic; using log4net; using NHibernate.Engine; using NHibernate.Proxy; -using NHibernate.Type; namespace NHibernate.ByteCode.LinFu { - public class ProxyFactory : IProxyFactory + public class ProxyFactory : AbstractProxyFactory { private static readonly global::LinFu.DynamicProxy.ProxyFactory factory = new global::LinFu.DynamicProxy.ProxyFactory(); protected static readonly ILog log = LogManager.GetLogger(typeof (ProxyFactory)); - protected System.Type PersistentClass { get; private set; } - - protected System.Type[] Interfaces { get; private set; } - - protected MethodInfo GetIdentifierMethod { get; private set; } - - public MethodInfo SetIdentifierMethod { get; private set; } - - protected IAbstractComponentType ComponentIdType { get; private set; } - - protected string EntityName { get; private set; } - - protected bool IsClassProxy - { - get { return Interfaces.Length == 1; } - } - #region IProxyFactory Members - public void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, - MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, - IAbstractComponentType componentIdType) + public override INHibernateProxy GetProxy(object id, ISessionImplementor session) { - EntityName = entityName; - PersistentClass = persistentClass; - Interfaces = new System.Type[interfaces.Count]; - - if (interfaces.Count > 0) - { - interfaces.CopyTo(Interfaces, 0); - } - - GetIdentifierMethod = getIdentifierMethod; - SetIdentifierMethod = setIdentifierMethod; - ComponentIdType = componentIdType; - } - - public INHibernateProxy GetProxy(object id, ISessionImplementor session) - { try { var initializer = new LazyInitializer(EntityName, PersistentClass, id, GetIdentifierMethod, SetIdentifierMethod, Deleted: trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs 2009-05-25 22:26:28 UTC (rev 4388) @@ -1,48 +0,0 @@ -using System.Reflection; -using Iesi.Collections.Generic; -using NHibernate.Engine; -using NHibernate.Proxy; -using NHibernate.Type; - -namespace NHibernate.ByteCode.Spring -{ - /// <summary> - /// Convenience base class for <see cref="IProxyFactory"/> implementations, - /// providing common functionality. - /// </summary> - /// <author>Erich Eichinger (Spring.NET Team)</author> - public abstract class AbstractProxyFactory : IProxyFactory - { - protected string EntityName { get; private set; } - protected System.Type PersistentClass { get; private set; } - protected System.Type[] Interfaces { get; private set; } - protected MethodInfo GetIdentifierMethod { get; private set; } - protected MethodInfo SetIdentifierMethod { get; private set; } - protected IAbstractComponentType ComponentIdType { get; private set; } - - protected bool IsClassProxy - { - get { return Interfaces.Length == 1; } - } - - public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, - MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, - IAbstractComponentType componentIdType) - { - EntityName = entityName; - PersistentClass = persistentClass; - Interfaces = new System.Type[interfaces.Count]; - - if (interfaces.Count > 0) - { - interfaces.CopyTo(Interfaces, 0); - } - - GetIdentifierMethod = getIdentifierMethod; - SetIdentifierMethod = setIdentifierMethod; - ComponentIdType = componentIdType; - } - - public abstract INHibernateProxy GetProxy(object id, ISessionImplementor session); - } -} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj 2009-05-25 22:26:28 UTC (rev 4388) @@ -63,7 +63,6 @@ </Reference> </ItemGroup> <ItemGroup> - <Compile Include="AbstractProxyFactory.cs" /> <Compile Include="AssemblyInfo.cs" /> <Compile Include="LazyInitializer.cs" /> <Compile Include="ProxyFactory.cs" /> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs 2009-05-25 21:31:19 UTC (rev 4387) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs 2009-05-25 22:26:28 UTC (rev 4388) @@ -6,9 +6,6 @@ /// <summary> /// Creates a Spring for .NET backed <see cref="IProxyFactory"/> instance. /// </summary> - /// <remarks> - /// TODO: mention how to configure - /// </remarks> /// <author>Erich Eichinger</author> public class ProxyFactoryFactory : IProxyFactoryFactory { @@ -21,7 +18,6 @@ public IProxyValidator ProxyValidator { - // TODO : check what this validator does? get { return new DynProxyTypeValidator(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:31:26
|
Revision: 4387 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4387&view=rev Author: tehlike Date: 2009-05-25 21:31:19 +0000 (Mon, 25 May 2009) Log Message: ----------- Removing xml output as it seems it is not necessary. Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2009-05-25 21:23:55 UTC (rev 4386) +++ trunk/nhibernate/build-common/common-project.xml 2009-05-25 21:31:19 UTC (rev 4387) @@ -223,7 +223,7 @@ <target name="common.run-tests" description="Run NUnit tests"> <exec program="${root.dir}/Tools/nunit/nunit-console-x86.exe"> - <arg line="${bin.dir}/${project::get-name()}.dll /xml=${bin.dir}/${project::get-name()}.dll.result.xml" /> + <arg line="${bin.dir}/${project::get-name()}.dll" /> </exec> <!--<nunit2> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:24:03
|
Revision: 4386 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4386&view=rev Author: tehlike Date: 2009-05-25 21:23:55 +0000 (Mon, 25 May 2009) Log Message: ----------- Adding missing pdb line. Modified Paths: -------------- trunk/nhibernate/teamcity.build Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-05-25 21:18:45 UTC (rev 4385) +++ trunk/nhibernate/teamcity.build 2009-05-25 21:23:55 UTC (rev 4386) @@ -14,6 +14,7 @@ </target> <target name="copy-teamcity-configuration"> <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.dll" todir="${root.dir}/Tools/nunit/addins" /> + <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.pdb" todir="${root.dir}/Tools/nunit/addins" /> <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:18:58
|
Revision: 4385 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4385&view=rev Author: tehlike Date: 2009-05-25 21:18:45 +0000 (Mon, 25 May 2009) Log Message: ----------- Work on test+teamcity integration. Modified Paths: -------------- trunk/nhibernate/teamcity.build Added Paths: ----------- trunk/nhibernate/Tools/nunit/addins/ Property changes on: trunk/nhibernate/Tools/nunit/addins ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-05-25 21:04:25 UTC (rev 4384) +++ trunk/nhibernate/teamcity.build 2009-05-25 21:18:45 UTC (rev 4385) @@ -13,6 +13,7 @@ </target> <target name="copy-teamcity-configuration"> + <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.dll" todir="${root.dir}/Tools/nunit/addins" /> <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:05:13
|
Revision: 4384 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4384&view=rev Author: tehlike Date: 2009-05-25 21:04:25 +0000 (Mon, 25 May 2009) Log Message: ----------- Initial teamcity build files. Added Paths: ----------- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml trunk/nhibernate/teamcity.build Added: trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml =================================================================== --- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml (rev 0) +++ trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml 2009-05-25 21:04:25 UTC (rev 4384) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> + <bytecode-provider type="lcg"/> + <reflection-optimizer use="true"/> + <session-factory name="NHibernate.Test"> + <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> + <property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property> + <property name="cache.use_query_cache">true</property> + <property name="query.startup_check">false</property> + <!-- + The valid strings for Isolation can be found in the documentation for the System.Data.IsolationLevel + Enumeration documentation. + Use the member names - not the values. + --> + <property name="adonet.batch_size">10</property> + <property name="connection.isolation">ReadCommitted</property> + <property name="format_sql">true</property> + + <!-- This is the System.Data.dll provider for MSSQL Server --> + <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> + <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="connection.connection_string">Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI</property> + <property name="show_sql">false</property> + <property name="use_outer_join">true</property> + <property name="command_timeout">444</property> + <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> + <property name="adonet.wrap_result_sets">false</property> + + <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> + </session-factory> + </hibernate-configuration> \ No newline at end of file Added: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build (rev 0) +++ trunk/nhibernate/teamcity.build 2009-05-25 21:04:25 UTC (rev 4384) @@ -0,0 +1,18 @@ +<?xml version="1.0" ?> +<project name="NHibernate TeamCity Build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" default="clean-configure-test"> + <property name="root.dir" value="." /> + <include buildfile="${root.dir}/default.build" /> + <!-- + <if test="${not property::exists('CCNetLabel') and not property::exists('build.number')}"> + <fail>This build file is for use with CruiseControl.NET or TeamCity</fail> + </if>--> + + <property name="build.number" value="${CCNetLabel}" if="${property::exists('CCNetLabel')}" /> + + <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration build test"> + + </target> + <target name="copy-teamcity-configuration"> + <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> + </target> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-25 20:03:58
|
Revision: 4383 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4383&view=rev Author: fabiomaulo Date: 2009-05-25 20:03:42 +0000 (Mon, 25 May 2009) Log Message: ----------- Minor (Changed the build configuration) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Everything.sln Modified: trunk/nhibernate/src/NHibernate.Everything.sln =================================================================== --- trunk/nhibernate/src/NHibernate.Everything.sln 2009-05-25 07:04:38 UTC (rev 4382) +++ trunk/nhibernate/src/NHibernate.Everything.sln 2009-05-25 20:03:42 UTC (rev 4383) @@ -137,8 +137,8 @@ {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|.NET.ActiveCfg = Release|Any CPU {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Any CPU.Build.0 = Release|Any CPU - {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {5C649B55-1B3F-4C38-9998-1B043E94A244}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Debug|.NET.ActiveCfg = Debug|Any CPU {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -147,8 +147,8 @@ {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|.NET.ActiveCfg = Release|Any CPU {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Any CPU.Build.0 = Release|Any CPU - {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7AEE5B37-C552-4E59-9B6F-88755BCB5070}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {4C251E3E-6EA1-4A51-BBCB-F9C42AE55344}.Debug|.NET.ActiveCfg = Debug|Any CPU {4C251E3E-6EA1-4A51-BBCB-F9C42AE55344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4C251E3E-6EA1-4A51-BBCB-F9C42AE55344}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -167,8 +167,8 @@ {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|.NET.ActiveCfg = Release|Any CPU {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Any CPU.ActiveCfg = Release|Any CPU {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Any CPU.Build.0 = Release|Any CPU - {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {58CE4584-31B9-4E74-A7FB-5D40BFAD0876}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {C5D6EE68-1760-4F97-AD31-42343593D8C1}.Debug|.NET.ActiveCfg = Debug|.NET {C5D6EE68-1760-4F97-AD31-42343593D8C1}.Debug|.NET.Build.0 = Debug|.NET {C5D6EE68-1760-4F97-AD31-42343593D8C1}.Debug|Any CPU.ActiveCfg = Debug|.NET @@ -189,7 +189,6 @@ {446E148D-A9D5-4D7D-A706-BEDD45B2BC7D}.Release|Any CPU.ActiveCfg = Release|Any CPU {446E148D-A9D5-4D7D-A706-BEDD45B2BC7D}.Release|Any CPU.Build.0 = Release|Any CPU {446E148D-A9D5-4D7D-A706-BEDD45B2BC7D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {446E148D-A9D5-4D7D-A706-BEDD45B2BC7D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {31C3F0EA-0FED-4A2F-B68D-96CE29844487}.Debug|.NET.ActiveCfg = Debug|Any CPU {31C3F0EA-0FED-4A2F-B68D-96CE29844487}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31C3F0EA-0FED-4A2F-B68D-96CE29844487}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -208,8 +207,8 @@ {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|.NET.ActiveCfg = Release|Any CPU {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Any CPU.ActiveCfg = Release|Any CPU {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Any CPU.Build.0 = Release|Any CPU - {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|.NET.ActiveCfg = Debug|Any CPU {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -228,8 +227,8 @@ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|.NET.ActiveCfg = Release|Any CPU {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Any CPU.ActiveCfg = Release|Any CPU {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Any CPU.Build.0 = Release|Any CPU - {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {946BCA10-109A-4472-8521-76616174AD4D}.Debug|.NET.ActiveCfg = Debug|Any CPU {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -248,8 +247,8 @@ {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|.NET.ActiveCfg = Release|Any CPU {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Any CPU.ActiveCfg = Release|Any CPU {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Any CPU.Build.0 = Release|Any CPU - {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 07:04:46
|
Revision: 4382 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4382&view=rev Author: tehlike Date: 2009-05-25 07:04:38 +0000 (Mon, 25 May 2009) Log Message: ----------- Further modifications to build files. Next step is to have special tc-nhibernate.cfg.xml for special configuration for teamcity. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build 2009-05-24 21:00:29 UTC (rev 4381) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build 2009-05-25 07:04:38 UTC (rev 4382) @@ -40,6 +40,6 @@ <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-tests" /> - <target name="test" depends="init build common.run-tests" /> + <target name="test" depends="init build common.run-database-tests" /> </project> Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build 2009-05-24 21:00:29 UTC (rev 4381) +++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build 2009-05-25 07:04:38 UTC (rev 4382) @@ -39,6 +39,6 @@ <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-tests" /> - <target name="test" depends="init build common.run-tests" /> + <target name="test" depends="init build common.run-database-tests" /> </project> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build 2009-05-24 21:00:29 UTC (rev 4381) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build 2009-05-25 07:04:38 UTC (rev 4382) @@ -42,6 +42,6 @@ <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-tests" /> - <target name="test" depends="init build common.run-tests" /> + <target name="test" depends="init build common.run-database-tests" /> </project> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-24 21:00:29 UTC (rev 4381) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-25 07:04:38 UTC (rev 4382) @@ -28,6 +28,8 @@ </target> <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-tests"> + + <if test="${file::exists(config.FileName)}"> <copy file="hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </if> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 21:00:38
|
Revision: 4381 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4381&view=rev Author: fabiomaulo Date: 2009-05-24 21:00:29 +0000 (Sun, 24 May 2009) Log Message: ----------- TYPO Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-05-24 15:23:32 UTC (rev 4380) +++ trunk/nhibernate/releasenotes.txt 2009-05-24 21:00:29 UTC (rev 4381) @@ -69,7 +69,7 @@ * [NH-1516] - HQL doesn't support "update" statements * [NH-1553] - SQL Server 2005: Support for wrapping snapshot isolation update conflict SQLException into a NHibernate StaleObjectStateException. * [NH-1670] - MutiCriteria and MultiQuery results may be loaded directly into a generic List<T> instead of an ArrayList - * [NH-1745] - SQL formatters for DLL and all others SQLs + * [NH-1745] - SQL formatters for DDL and all others SQLs * [NH-1750] - Mark NHibernate.Util.WeakHashtable [Serializable] * [NH-1765] - Add ISessionImplementor property to PreDeleteEvent * [NH-1791] - Allow passing params of projections to ICriteria.SetProjectios This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 15:23:40
|
Revision: 4380 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4380&view=rev Author: fabiomaulo Date: 2009-05-24 15:23:32 +0000 (Sun, 24 May 2009) Log Message: ----------- Changed to 2.1.0.Beta1 Modified Paths: -------------- trunk/nhibernate/build-common/common.xml Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2009-05-24 14:16:50 UTC (rev 4379) +++ trunk/nhibernate/build-common/common.xml 2009-05-24 15:23:32 UTC (rev 4380) @@ -76,7 +76,7 @@ effectively SP0). --> - <property name="project.version" value="2.1.0.Alpha3" overwrite="false" /> + <property name="project.version" value="2.1.0.Beta1" overwrite="false" /> <!-- Compute short project version (major.minor) using a regex --> <regex input="${project.version}" pattern="^(?'shortversion'\d+\.\d+)" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 14:16:57
|
Revision: 4379 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4379&view=rev Author: fabiomaulo Date: 2009-05-24 14:16:50 +0000 (Sun, 24 May 2009) Log Message: ----------- releasenotes.txt of NH2.1.0Alpha3 Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-05-24 12:28:07 UTC (rev 4378) +++ trunk/nhibernate/releasenotes.txt 2009-05-24 14:16:50 UTC (rev 4379) @@ -31,6 +31,62 @@ * Obsolete ORACLE dialects was removed (new implementations are available) * ISQLExceptionConverter was changed in order to have more flexibility about information available for the conversion and followed management. * ADOException now use string instead SqlString + +Build 2.1.0.Alpha3 (rev4378) +============================= + +** Bug + * [NH-1098] - Problem in filters with parameters and associated logging information + * [NH-1179] - Filter not applied in explicit join + * [NH-1264] - Eager fetching with Criteria/DetachedCriteria does not seem to be working properly + * [NH-1307] - Parameter Postion incorrect in the sql query . + * [NH-1343] - In HQL, when having only one Class for query it fails to work if we forget the Alias. + * [NH-1388] - Map does not delete keys if value of the key is null + * [NH-1574] - Stateless Session isn't ignoring untouched proxy properties on update + * [NH-1725] - When using SELECT NEW <Entity>(iif(a=0, 2, 1)) From .... Returns error '(' expected after HQL function in SELECT + * [NH-1727] - Hql parameter problems (Sql2005dialect) + * [NH-1736] - NHibernate.Util.TypeNameParser doesn't parse correctly generic types + * [NH-1741] - DetachedNamedQuery is ignoring mapped properties + * [NH-1742] - Wrong parameters order in IQuery with SetParameterList and Filter. SQL Server 2005 and SQL Server 2000 + * [NH-1744] - Open/Close a session inside a TransactionScope fails. + * [NH-1751] - DistinctRootEntityResultTransformer assumes source ILists are always ArrayLists + * [NH-1754] - cast HQLFunction don't cast the result + * [NH-1756] - Updating newly saved entity with generated version causes StaleObjectStateException (explicit flush before commit) + * [NH-1764] - TableHiLoGenerator fail in a TransactionScope with MySQL database + * [NH-1767] - Multiple TransactionScopes inside one Session do not work properly + * [NH-1770] - Not posible to have system properties in web.config and session-factory properties in external hibernate.cfg.xml + * [NH-1773] - HQL Queries with projection and join fetching fail with AST query translator + * [NH-1775] - AST Parser & Bitwise queries + * [NH-1776] - Query executed twice on session with enabled Filter will cause NullReferenceException + * [NH-1780] - Section 18.4 - Incorrect method name IsUnsaved() + * [NH-1788] - Dynamic Update & generated timestamp cause NH to try to update the readonly timestamp column + * [NH-1792] - Invalid Sql for Paging when Subquery contains Order By clause using MsSql2005Dialect + +** Improvement + * [NH-514] - Allow expansion of the "on" clause in joins. + * [NH-1051] - Port AST-based HQL parser / QueryTranslator from H3 + * [NH-1093] - Invalid caching probably shouldn't throw exceptions, but should log warnings. + * [NH-1516] - HQL doesn't support "update" statements + * [NH-1553] - SQL Server 2005: Support for wrapping snapshot isolation update conflict SQLException into a NHibernate StaleObjectStateException. + * [NH-1670] - MutiCriteria and MultiQuery results may be loaded directly into a generic List<T> instead of an ArrayList + * [NH-1745] - SQL formatters for DLL and all others SQLs + * [NH-1750] - Mark NHibernate.Util.WeakHashtable [Serializable] + * [NH-1765] - Add ISessionImplementor property to PreDeleteEvent + * [NH-1791] - Allow passing params of projections to ICriteria.SetProjectios + * [NH-1794] - Allow query only properties and associations + * [NH-1797] - MsSql2005Dialect uses paging query when no offset specified + +** New Feature + * [NH-322] - case when...then...else...end in select clause + * [NH-917] - Allow NHibernate to enlist in arbitrary IDbTransaction + * [NH-1701] - format_sql property of hibernate + * [NH-1786] - IObjectFactory (implementation responsibility by ByteCode provider) to concentrate all Activator.CreateInstance. + +** Patch + * [NH-1726] - ISessionFactory.Settings gone - breaking change + * [NH-1769] - Transaction completion on rollback with TransactionScope can cause ObjectDisposedException + * [NH-1777] - Removed some duplicated casts + * [NH-1783] - DateType should store only the date part of a System.DateTime to a column Build 2.1.0.Alpha2 (rev4167) ======================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-24 12:43:11
|
Revision: 4378 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4378&view=rev Author: tehlike Date: 2009-05-24 12:28:07 +0000 (Sun, 24 May 2009) Log Message: ----------- Improvements in Build files, now parameters for nh properties such as connection string is possible. Check sample build commands.txt for sample usages Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml trunk/nhibernate/build-common/nhibernate-properties.xml trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/build-common/common-project.xml 2009-05-24 12:28:07 UTC (rev 4378) @@ -222,8 +222,11 @@ <target name="common.run-tests" description="Run NUnit tests"> + <exec program="${root.dir}/Tools/nunit/nunit-console-x86.exe"> + <arg line="${bin.dir}/${project::get-name()}.dll /xml=${bin.dir}/${project::get-name()}.dll.result.xml" /> + </exec> - <nunit2> + <!--<nunit2> <formatter type="Xml" usefile="true" @@ -233,7 +236,7 @@ <test assemblyname="${bin.dir}/${project::get-name()}.dll" appconfig="${bin.dir}/${project::get-name()}.dll.config" /> - </nunit2> + </nunit2>--> </target> @@ -250,21 +253,28 @@ <!-- Tell nhibernate how to connect to the test database. --> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.dialect']/@value" - value="${nhibernate.dialect}" - /> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.connection.driver_class']/@value" - value="${nhibernate.connection.driver_class}" - /> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.connection.connection_string']/@value" - value="${nhibernate.connection.connection_string}" - /> + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='dialect']" + value="${nhibernate.dialect}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> + + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='connection.driver_class']" + value="${nhibernate.connection.driver_class}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='connection.connection_string']" + value="${nhibernate.connection.connection_string}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> </target> <target name="common.remove-connection-settings-from-app-config"> Modified: trunk/nhibernate/build-common/nhibernate-properties.xml =================================================================== --- trunk/nhibernate/build-common/nhibernate-properties.xml 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/build-common/nhibernate-properties.xml 2009-05-24 12:28:07 UTC (rev 4378) @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> - <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" /> - <property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" /> - <property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" /> + <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect" overwrite="false"/> + <property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" overwrite="false"/> + <property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/> </project> Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/default.build 2009-05-24 12:28:07 UTC (rev 4378) @@ -123,26 +123,9 @@ </target> <target name="test" depends="init build" description="Runs all NHibernate tests for the current framework" unless="${skip.tests}"> - <!-- <nant target="test"> <buildfiles refid="buildfiles.tests" /> </nant> - --> - <!-- --> - <foreach item="File" property="buildfile"> - <in> - <items refid="buildfiles.tests" /> - </in> - <do> - <exec program="nant.exe"> - <arg value="-f:${buildfile}" /> - <arg value="-t:${nant.settings.currentframework}" /> - <arg value="-D:project.config=${project.config}" /> - <arg value="test" /> - </exec> - </do> - </foreach> - <!-- --> </target> <target name="coverage-report" description="Builds the test coverage reports" Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-24 12:28:07 UTC (rev 4378) @@ -34,5 +34,5 @@ <copy file="TestEnbeddedConfig.cfg.xml" tofile="${bin.dir}/TestEnbeddedConfig.cfg.xml" /> <copy file="${root.dir}/src/NHibernate.DomainModel/ABC.hbm.xml" tofile="${bin.dir}/ABC.hbm.xml" /> </target> - <target name="test" depends="init build common.run-tests" /> + <target name="test" depends="init build common.run-database-tests" /> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-24 10:13:27
|
Revision: 4377 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4377&view=rev Author: tehlike Date: 2009-05-24 10:13:22 +0000 (Sun, 24 May 2009) Log Message: ----------- Adding nunit files (both assemblies and executables) to Tools. Added Paths: ----------- trunk/nhibernate/Tools/nunit/ trunk/nhibernate/Tools/nunit/NUnitFitTests.html trunk/nhibernate/Tools/nunit/NUnitTests.config trunk/nhibernate/Tools/nunit/NUnitTests.nunit trunk/nhibernate/Tools/nunit/agent.conf trunk/nhibernate/Tools/nunit/agent.log.conf trunk/nhibernate/Tools/nunit/clr.bat trunk/nhibernate/Tools/nunit/framework/ trunk/nhibernate/Tools/nunit/framework/nunit.framework.dll trunk/nhibernate/Tools/nunit/framework/nunit.framework.xml trunk/nhibernate/Tools/nunit/framework/nunit.mocks.dll trunk/nhibernate/Tools/nunit/framework/pnunit.framework.dll trunk/nhibernate/Tools/nunit/launcher.log.conf trunk/nhibernate/Tools/nunit/lib/ trunk/nhibernate/Tools/nunit/lib/Failure.jpg trunk/nhibernate/Tools/nunit/lib/Gray.jpg trunk/nhibernate/Tools/nunit/lib/Ignored.jpg trunk/nhibernate/Tools/nunit/lib/Success.jpg trunk/nhibernate/Tools/nunit/lib/fit.dll trunk/nhibernate/Tools/nunit/lib/log4net.dll trunk/nhibernate/Tools/nunit/lib/nunit-console-runner.dll trunk/nhibernate/Tools/nunit/lib/nunit-gui-runner.dll trunk/nhibernate/Tools/nunit/lib/nunit.core.dll trunk/nhibernate/Tools/nunit/lib/nunit.core.interfaces.dll trunk/nhibernate/Tools/nunit/lib/nunit.fixtures.dll trunk/nhibernate/Tools/nunit/lib/nunit.uiexception.dll trunk/nhibernate/Tools/nunit/lib/nunit.uikit.dll trunk/nhibernate/Tools/nunit/lib/nunit.util.dll trunk/nhibernate/Tools/nunit/nunit-agent.exe trunk/nhibernate/Tools/nunit/nunit-agent.exe.config trunk/nhibernate/Tools/nunit/nunit-console-runner.dll trunk/nhibernate/Tools/nunit/nunit-console-x86.exe trunk/nhibernate/Tools/nunit/nunit-console-x86.exe.config trunk/nhibernate/Tools/nunit/nunit-console.exe trunk/nhibernate/Tools/nunit/nunit-console.exe.config trunk/nhibernate/Tools/nunit/nunit-x86.exe trunk/nhibernate/Tools/nunit/nunit-x86.exe.config trunk/nhibernate/Tools/nunit/nunit.core.dll trunk/nhibernate/Tools/nunit/nunit.core.interfaces.dll trunk/nhibernate/Tools/nunit/nunit.exe trunk/nhibernate/Tools/nunit/nunit.exe.config trunk/nhibernate/Tools/nunit/nunit.framework.dll trunk/nhibernate/Tools/nunit/nunit.util.dll trunk/nhibernate/Tools/nunit/pnunit-agent.exe trunk/nhibernate/Tools/nunit/pnunit-agent.exe.config trunk/nhibernate/Tools/nunit/pnunit-launcher.exe trunk/nhibernate/Tools/nunit/pnunit-launcher.exe.config trunk/nhibernate/Tools/nunit/pnunit.framework.dll trunk/nhibernate/Tools/nunit/pnunit.tests.dll trunk/nhibernate/Tools/nunit/runFile.exe trunk/nhibernate/Tools/nunit/runFile.exe.config trunk/nhibernate/Tools/nunit/runpnunit.bat trunk/nhibernate/Tools/nunit/test.conf Property changes on: trunk/nhibernate/Tools/nunit ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: svn:ignore + tests Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/Tools/nunit/NUnitFitTests.html =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitFitTests.html (rev 0) +++ trunk/nhibernate/Tools/nunit/NUnitFitTests.html 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,277 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> + <body> + <h1>NUnit Acceptance Tests</h1> + <p> + Developers love self-referential programs! Hence, NUnit has always run all it's + own tests, even those that are not really unit tests. + <p>Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's + FIT framework. At this time, the tests are pretty rudimentary, but it's a start + and it's a framework for doing more. + <h2>Running the Tests</h2> + <p>Open a console or shell window and navigate to the NUnit bin directory, which + contains this file. To run the test under Microsoft .Net, enter the command + <pre> runFile NUnitFitTests.html TestResults.html .</pre> + To run it under Mono, enter + <pre> mono runFile.exe NUnitFitTests.html TestResults.html .</pre> + Note the space and dot at the end of each command. The results of your test + will be in TestResults.html in the same directory. + <h2>Platform and CLR Version</h2> + <table BORDER cellSpacing="0" cellPadding="5"> + <tr> + <td colspan="2">NUnit.Fixtures.PlatformInfo</td> + </tr> + </table> + <h2>Verify Unit Tests</h2> + <p> + Load and run the NUnit unit tests, verifying that the results are as expected. + When these tests are run on different platforms, different numbers of tests may + be skipped, so the values for Skipped and Run tests are informational only. + <p> + The number of tests in each assembly should be constant across all platforms - + any discrepancy usually means that one of the test source files was not + compiled on the platform. There should be no failures and no tests ignored. + <p><b>Note:</b> + At the moment, the nunit.extensions.tests assembly is failing because the + fixture doesn't initialize addins in the test domain. + <p> + <table BORDER cellSpacing="0" cellPadding="5"> + <tr> + <td colspan="6">NUnit.Fixtures.AssemblyRunner</td> + </tr> + <tr> + <td>Assembly</td> + <td>Tests()</td> + <td>Run()</td> + <td>Skipped()</td> + <td>Ignored()</td> + <td>Failures()</td> + </tr> + <tr> + <td>nunit.framework.tests.dll</td> + <td>397</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.core.tests.dll</td> + <td>355</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.util.tests.dll</td> + <td>238</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.mocks.tests.dll</td> + <td>43</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.extensions.tests.dll</td> + <td>5</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit-console.tests.dll</td> + <td>40</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.uikit.tests.dll</td> + <td>34</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit-gui.tests.dll</td> + <td>15</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td>nunit.fixtures.tests.dll</td> + <td>6</td> + <td> </td> + <td> </td> + <td>0</td> + <td>0</td> + </tr> + </table> + <h2>Code Snippet Tests</h2> + <p> + These tests create a test assembly from a snippet of code and then load and run + the tests that it contains, verifying that the structure of the loaded tests is + as expected and that the number of tests run, skipped, ignored or failed is + correct. + <p> + <table BORDER cellSpacing="0" cellPadding="5"> + <tr> + <td colspan="6">NUnit.Fixtures.SnippetRunner</td> + </tr> + <tr> + <td>Code</td> + <td>Tree()</td> + <td>Run()</td> + <td>Skipped()</td> + <td>Ignored()</td> + <td>Failures()</td> + </tr> + <tr> + <td><pre>public class TestClass +{ +}</pre> + </td> + <td>EMPTY</td> + <td>0</td> + <td>0</td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td><pre>using NUnit.Framework; + +[TestFixture] +public class TestClass +{ +}</pre> + </td> + <td>TestClass</td> + <td>0</td> + <td>0</td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td><pre>using NUnit.Framework; + +[TestFixture] +public class TestClass +{ + [Test] + public void T1() { } + [Test] + public void T2() { } + [Test] + public void T3() { } +}</pre> + </td> + <td><pre>TestClass +>T1 +>T2 +>T3</pre> + </td> + <td>3</td> + <td>0</td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td><pre>using NUnit.Framework; + +[TestFixture] +public class TestClass1 +{ + [Test] + public void T1() { } +} + +[TestFixture] +public class TestClass2 +{ + [Test] + public void T2() { } + [Test] + public void T3() { } +}</pre> + </td> + <td><pre>TestClass1 +>T1 +TestClass2 +>T2 +>T3</pre> + </td> + <td>3</td> + <td>0</td> + <td>0</td> + <td>0</td> + </tr> + <tr> + <td><pre>using NUnit.Framework; + +[TestFixture] +public class TestClass +{ + [Test] + public void T1() { } + [Test, Ignore] + public void T2() { } + [Test] + public void T3() { } +}</pre> + </td> + <td><pre>TestClass +>T1 +>T2 +>T3</pre> + </td> + <td>2</td> + <td>0</td> + <td>1</td> + <td>0</td> + </tr> + <tr> + <td><pre>using NUnit.Framework; + +[TestFixture] +public class TestClass +{ + [Test] + public void T1() { } + [Test, Explicit] + public void T2() { } + [Test] + public void T3() { } +}</pre> + </td> + <td><pre>TestClass +>T1 +>T2 +>T3</pre> + </td> + <td>2</td> + <td>1</td> + <td>0</td> + <td>0</td> + </tr> + </table> + <h2>Summary Information</h2> + <table BORDER cellSpacing="0" cellPadding="5"> + <tr> + <td colspan="2">fit.Summary</td> + </tr> + </table> + </body> +</html> Added: trunk/nhibernate/Tools/nunit/NUnitTests.config =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitTests.config (rev 0) +++ trunk/nhibernate/Tools/nunit/NUnitTests.config 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> +<!-- + This is the configuration file for the NUnitTests.nunit test project. You may + need to create a similar configuration file for your own test project. + --> + +<!-- + The <NUnit> section is only needed if you want to use a non-default value + for any of the settings. It is commented out below. If you are going to use + it, you must deifne the NUnit section group and the sections you need. + + The syntax shown here works for most runtimes. If NUnit fails at startup, you + can try specifying the name of the assembly containing the NameValueSectionHandler: + + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler, System" /> + + If that fails, try the fully qualified name of the assembly: + + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler, System, + Version=2.0.50727.832, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + + Unfortunately, this last approach makes your config file non-portable across runtimes. + --> + +<!-- + <configSections> + <sectionGroup name="NUnit"> + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler"/> + <section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/> + </sectionGroup> + </configSections> + --> + + <appSettings> + <!-- User application and configured property settings go here.--> + <!-- Example: <add key="settingName" value="settingValue"/> --> + <add key="test.setting" value="54321" /> + </appSettings> + +<!-- Sample NUnit section group showing all default values --> +<!-- + <NUnit> + <TestCaseBuilder> + <add key="OldStyleTestCases" value="false" /> + </TestCaseBuilder> + <TestRunner> + <add key="ApartmentState" value="MTA" /> + <add key="ThreadPriority" value="Normal" /> + </TestRunner> + </NUnit> +--> + + <!-- + The following <runtime> section allows running nunit tests under + .NET 1.0 by redirecting assemblies. The appliesTo attribute + causes the section to be ignored except under .NET 1.0. + --> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" + appliesTo="v1.0.3705"> + <dependentAssembly> + <assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="" /> + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="" /> + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="" /> + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="" /> + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="" /> + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> Added: trunk/nhibernate/Tools/nunit/NUnitTests.nunit =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitTests.nunit (rev 0) +++ trunk/nhibernate/Tools/nunit/NUnitTests.nunit 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,14 @@ +<NUnitProject> + <Settings appbase="."/> + <Config name="Default" binpath="lib;tests;framework" runtimeFramework="v2.0"> + <assembly path="tests/nunit.framework.tests.dll" /> + <assembly path="tests/nunit.core.tests.dll" /> + <assembly path="tests/nunit.util.tests.dll" /> + <assembly path="tests/nunit.mocks.tests.dll" /> + <assembly path="tests/nunit-console.tests.dll" /> + <assembly path="tests/nunit.uiexception.tests.dll" /> + <assembly path="tests/nunit.uikit.tests.dll" /> + <assembly path="tests/nunit-gui.tests.dll" /> + <assembly path="tests/nunit.fixtures.tests.dll" /> + </Config> +</NUnitProject> Added: trunk/nhibernate/Tools/nunit/agent.conf =================================================================== --- trunk/nhibernate/Tools/nunit/agent.conf (rev 0) +++ trunk/nhibernate/Tools/nunit/agent.conf 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,4 @@ +<AgentConfig> + <Port>8080</Port> + <PathToAssemblies>.</PathToAssemblies> +</AgentConfig> \ No newline at end of file Added: trunk/nhibernate/Tools/nunit/agent.log.conf =================================================================== --- trunk/nhibernate/Tools/nunit/agent.log.conf (rev 0) +++ trunk/nhibernate/Tools/nunit/agent.log.conf 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,18 @@ +<log4net> + <!-- A1 is set to be a ConsoleAppender --> + <appender name="A1" type="log4net.Appender.ConsoleAppender"> + + <!-- A1 uses PatternLayout --> + <layout type="log4net.Layout.PatternLayout"> + <!-- Print the date in ISO 8601 format --> + <conversionPattern value="%-5level %logger - %message%newline" /> + </layout> + </appender> + + <!-- Set root logger level to DEBUG and its only appender to A1 --> + <root> + <level value="DEBUG" /> + <appender-ref ref="A1" /> + </root> + +</log4net> Added: trunk/nhibernate/Tools/nunit/clr.bat =================================================================== --- trunk/nhibernate/Tools/nunit/clr.bat (rev 0) +++ trunk/nhibernate/Tools/nunit/clr.bat 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,96 @@ +@echo off +rem Run a program under a particular version of the .Net framework +rem by setting the COMPLUS_Version environment variable. +rem +rem This command was written by Charlie Poole for the NUnit project. +rem You may use it separately from NUnit at your own risk. + +if "%1"=="/?" goto help +if "%1"=="?" goto help +if "%1"=="" goto GetVersion +if /I "%1"=="off" goto RemoveVersion +if "%2"=="" goto SetVersion +goto main + +:help +echo Control the version of the .Net framework that is used. The +echo command has several forms: +echo. +echo CLR +echo Reports the version of the CLR that has been set +echo. +echo CLR version +echo Sets the local shell environment to use a specific +echo version of the CLR for subsequent commands. +echo. +echo CLR version command [arguments] +echo Executes a single command using the specified CLR version. +echo. +echo CLR off +echo Turns off specific version selection for commands +echo. +echo The CLR version may be specified as vn.n.n or n.n.n. In addition, +echo the following shortcuts are recognized: +echo net-1.0, 1.0 For version 1.0.3705 +echo net-1.1, 1.1 For version 1.1.4322 +echo beta2 For version 2.0.50215 +echo net-2.0, 2.0 For version 2.0.50727 +echo. +echo NOTE: +echo Any specific settings for required or supported runtime in +echo the ^<startup^> section of a program's config file will +echo override the version specified by this command, and the +echo command will have no effect. +echo. +goto done + +:main + +setlocal +set CMD= +call :SetVersion %1 +shift /1 + +:loop 'Copy remaining arguments to form the command +if "%1"=="" goto run +set CMD=%CMD% %1 +shift /1 +goto :loop + +:run 'Execute the command +%CMD% +endlocal +goto done + +:SetVersion +set COMPLUS_Version=%1 + +rem Substitute proper format for certain names +if /I "%COMPLUS_Version:~0,1%"=="v" goto useit +if /I "%COMPLUS_Version%"=="net-1.0" set COMPLUS_Version=v1.0.3705&goto report +if /I "%COMPLUS_Version%"=="1.0" set COMPLUS_Version=v1.0.3705&goto report +if /I "%COMPLUS_Version%"=="net-1.1" set COMPLUS_Version=v1.1.4322&goto report +if /I "%COMPLUS_Version%"=="1.1" set COMPLUS_Version=v1.1.4322&goto report +if /I "%COMPLUS_Version%"=="beta2" set COMPLUS_Version=v2.0.50215&goto report +if /I "%COMPLUS_Version%"=="net-2.0" set COMPLUS_Version=v2.0.50727&goto report +if /I "%COMPLUS_Version%"=="2.0" set COMPLUS_Version=v2.0.50727&goto report + +rem Add additional substitutions here, branching to report + +rem assume it's a version number without 'v' +set COMPLUS_Version=v%COMPLUS_Version% + +:report +echo Setting CLR version to %COMPLUS_Version% +goto done + +:GetVersion +if "%COMPLUS_Version%"=="" echo CLR version is not set +if NOT "%COMPLUS_Version%"=="" echo CLR version is set to %COMPLUS_Version% +goto done + +:RemoveVersion +set COMPLUS_Version= +echo CLR version is no longer set + +:done \ No newline at end of file Property changes on: trunk/nhibernate/Tools/nunit/framework ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/Tools/nunit/framework/nunit.framework.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/Tools/nunit/framework/nunit.framework.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/Tools/nunit/framework/nunit.framework.xml =================================================================== --- trunk/nhibernate/Tools/nunit/framework/nunit.framework.xml (rev 0) +++ trunk/nhibernate/Tools/nunit/framework/nunit.framework.xml 2009-05-24 10:13:22 UTC (rev 4377) @@ -0,0 +1,9803 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>nunit.framework</name> + </assembly> + <members> + <member name="T:NUnit.Framework.Constraints.TypeConstraint"> + <summary> + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.Constraint"> + <summary> + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.IResolveConstraint"> + <summary> + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.IResolveConstraint.Resolve"> + <summary> + Return the top-level constraint for this expression + </summary> + <returns></returns> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.UNSET"> + <summary> + Static UnsetObject used to detect derived constraints + failing to set the actual value. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.actual"> + <summary> + The actual value being tested against a constraint + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.displayName"> + <summary> + The display name of this Constraint for use by ToString() + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.argcnt"> + <summary> + Argument fields used by ToString(); + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.builder"> + <summary> + The builder holding this constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor"> + <summary> + Construct a constraint with no arguments + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object)"> + <summary> + Construct a constraint with one argument + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object,System.Object)"> + <summary> + Construct a constraint with two arguments + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.SetBuilder(NUnit.Framework.Constraints.ConstraintBuilder)"> + <summary> + Sets the ConstraintBuilder holding this constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteMessageTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the failure message to the MessageWriter provided + as an argument. The default implementation simply passes + the constraint and the actual value to the writer, which + then displays the constraint description and the value. + + Constraints that need to provide additional details, + such as where the error occured can override this. + </summary> + <param name="writer">The MessageWriter on which to display the message</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Matches(NUnit.Framework.Constraints.ActualValueDelegate)"> + <summary> + Test whether the constraint is satisfied by an + ActualValueDelegate that returns the value to be tested. + The default implementation simply evaluates the delegate + but derived classes may override it to provide for delayed + processing. + </summary> + <param name="del">An ActualValueDelegate</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Matches``1(``0@)"> + <summary> + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + </summary> + <param name="actual">A reference to the value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.ToString"> + <summary> + Default override of ToString returns the constraint DisplayName + followed by any arguments within angle brackets. + </summary> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseAnd(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseOr(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_LogicalNot(NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32)"> + <summary> + Returns a DelayedConstraint with the specified delay time. + </summary> + <param name="delayInMilliseconds">The delay in milliseconds.</param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32,System.Int32)"> + <summary> + Returns a DelayedConstraint with the specified delay time + and polling interval. + </summary> + <param name="delayInMilliseconds">The delay in milliseconds.</param> + <param name="pollingInterval">The interval at which to test the constraint.</param> + <returns></returns> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.DisplayName"> + <summary> + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.And"> + <summary> + Returns a ConstraintExpression by appending And + to the current constraint. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.With"> + <summary> + Returns a ConstraintExpression by appending And + to the current constraint. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.Or"> + <summary> + Returns a ConstraintExpression by appending Or + to the current constraint. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.Constraint.UnsetObject"> + <summary> + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.TypeConstraint.expectedType"> + <summary> + The expected Type used by the constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.TypeConstraint.#ctor(System.Type)"> + <summary> + Construct a TypeConstraint for a given Type + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.TypeConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.ExactTypeConstraint"> + <summary> + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.#ctor(System.Type)"> + <summary> + Construct an ExactTypeConstraint for a given Type + </summary> + <param name="type">The expected Type.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.Matches(System.Object)"> + <summary> + Test that an object is of the exact type specified + </summary> + <param name="actual">The actual value.</param> + <returns>True if the tested object is of the exact type provided, otherwise false.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the description of this constraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to use</param> + </member> + <member name="T:NUnit.Framework.Constraints.InstanceOfTypeConstraint"> + <summary> + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.#ctor(System.Type)"> + <summary> + Construct an InstanceOfTypeConstraint for the type provided + </summary> + <param name="type">The expected Type</param> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.Matches(System.Object)"> + <summary> + Test whether an object is of the specified type or a derived type + </summary> + <param name="actual">The object to be tested</param> + <returns>True if the object is of the provided type or derives from it, otherwise false.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to use</param> + </member> + <member name="T:NUnit.Framework.Constraints.AssignableFromConstraint"> + <summary> + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.#ctor(System.Type)"> + <summary> + Construct an AssignableFromConstraint for the type provided + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.Matches(System.Object)"> + <summary> + Test whether an object can be assigned from the specified type + </summary> + <param name="actual">The object to be tested</param> + <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to use</param> + </member> + <member name="T:NUnit.Framework.Constraints.AssignableToConstraint"> + <summary> + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.#ctor(System.Type)"> + <summary> + Construct an AssignableToConstraint for the type provided + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.Matches(System.Object)"> + <summary> + Test whether an object can be assigned to the specified type + </summary> + <param name="actual">The object to be tested</param> + <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to use</param> + </member> + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder"> + <summary> + ConstraintBuilder maintains the stacks that are used in + processing a ConstraintExpression. An OperatorStack + is used to hold operators that are waiting for their + operands to be reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:ConstraintBuilder"/> class. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.ConstraintOperator)"> + <summary> + Appends the specified operator to the expression by first + reducing the operator stack and then pushing the new + operator on the stack. + </summary> + <param name="op">The operator to push.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.Constraint)"> + <summary> + Appends the specified constraint to the expresson by pushing + it on the constraint stack. + </summary> + <param name="constraint">The constraint to push.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.SetTopOperatorRightContext(System.Object)"> + <summary> + Sets the top operator right context. + </summary> + <param name="rightContext">The right context.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ReduceOperatorStack(System.Int32)"> + <summary> + Reduces the operator stack until the topmost item + precedence is greater than or equal to the target precedence. + </summary> + <param name="targetPrecedence">The target precedence.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Resolve"> + <summary> + Resolves this instance, returning a Constraint. If the builder + is not currently in a resolvable state, an exception is thrown. + </summary> + <returns>The resolved constraint</returns> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.IsResolvable"> + <summary> + Gets a value indicating whether this instance is resolvable. + </summary> + <value> + <c>true</c> if this instance is resolvable; otherwise, <c>false</c>. + </value> + </member> + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack"> + <summary> + OperatorStack is a type-safe stack for holding ConstraintOperators + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> + <summary> + Initializes a new instance of the <see cref="T:OperatorStack"/> class. + </summary> + <param name="builder">The builder.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Push(NUnit.Framework.Constraints.ConstraintOperator)"> + <summary> + Pushes the specified operator onto the stack. + </summary> + <param name="op">The op.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Pop"> + <summary> + Pops the topmost operator from the stack. + </summary> + <returns></returns> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Empty"> + <summary> + Gets a value indicating whether this <see cref="T:OpStack"/> is empty. + </summary> + <value><c>true</c> if empty; otherwise, <c>false</c>.</value> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Top"> + <summary> + Gets the topmost operator without modifying the stack. + </summary> + <value>The top.</value> + </member> + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack"> + <summary> + ConstraintStack is a type-safe stack for holding Constraints + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> + <summary> + Initializes a new instance of the <see cref="T:ConstraintStack"/> class. + </summary> + <param name="builder">The builder.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Push(NUnit.Framework.Constraints.Constraint)"> + <summary> + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + </summary> + <param name="constraint">The constraint.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Pop"> + <summary> + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + </summary> + <returns></returns> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Empty"> + <summary> + Gets a value indicating whether this <see cref="T:ConstraintStack"/> is empty. + </summary> + <value><c>true</c> if empty; otherwise, <c>false</c>.</value> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Top"> + <summary> + Gets the topmost constraint without modifying the stack. + </summary> + <value>The topmost constraint</value> + </member> + <member name="T:NUnit.Framework.Constraints.ThrowsConstraint"> + <summary> + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.PrefixConstraint"> + <summary> + Abstract base class used for prefixes + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.PrefixConstraint.baseConstraint"> + <summary> + The base constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.PrefixConstraint.#ctor(NUnit.Framework.Constraints.IResolveConstraint)"> + <summary> + Construct given a base constraint + </summary> + <param name="resolvable"></param> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> + <summary> + Initializes a new instance of the <see cref="T:ThrowsConstraint"/> class, + using a constraint to be applied to the exception. + </summary> + <param name="baseConstraint">A constraint to apply to the caught exception.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.Matches(System.Object)"> + <summary> + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + </summary> + <param name="actual">A delegate representing the code to be tested</param> + <returns>True if an exception is thrown and the constraint succeeds, otherwise false</returns> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.ToString"> + <summary> + Returns the string representation of this constraint + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ThrowsConstraint.ActualException"> + <summary> + Get the actual exception thrown - used by Assert.Throws. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.ThrowsNothingConstraint"> + <summary> + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True if no exception is thrown, otherwise false</returns> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionConstraint"> + <summary> + CollectionConstraint is the abstract base class for + constraints that operate on collections. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor"> + <summary> + Construct an empty CollectionConstraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor(System.Object)"> + <summary> + Construct a CollectionConstraint + </summary> + <param name="arg"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.IsEmpty(System.Collections.IEnumerable)"> + <summary> + Determines whether the specified enumerable is empty. + </summary> + <param name="enumerable">The enumerable.</param> + <returns> + <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>. + </returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Protected method to be implemented by derived classes + </summary> + <param name="collection"></param> + <returns></returns> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionItemsEqualConstraint"> + <summary> + CollectionItemsEqualConstraint is the abstract base class for all + collection constraints that apply some notion of item equality + as a part of their operation. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor"> + <summary> + Construct an empty CollectionConstraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor(System.Object)"> + <summary> + Construct a CollectionConstraint + </summary> + <param name="arg"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IComparer)"> + <summary> + Flag the constraint to use the supplied IComparer object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> + <summary> + Flag the constraint to use the supplied IComparer object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Comparison{``0})"> + <summary> + Flag the constraint to use the supplied Comparison object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IEqualityComparer)"> + <summary> + Flag the constraint to use the supplied IEqualityComparer object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> + <summary> + Flag the constraint to use the supplied IEqualityComparer object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.ItemsEqual(System.Object,System.Object)"> + <summary> + Compares two collection members for equality + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Tally(System.Collections.IEnumerable)"> + <summary> + Return a new CollectionTally for use in making tests + </summary> + <param name="c">The collection to be included in the tally</param> + </member> + <member name="P:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.IgnoreCase"> + <summary> + Flag the constraint to ignore case and return self. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.CollectionTally"> + <summary> + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.CollectionTally.#ctor(NUnit.Framework.Constraints.NUnitEqualityComparer,System.Collections.IEnumerable)"> + <summary> + Construct a CollectionTally object from a comparer and a collection + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.CollectionTally.TryRemove(System.Object)"> + <summary> + Try to remove an object from the tally + </summary> + <param name="o">The object to remove</param> + <returns>True if successful, false if the object was not found</returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.CollectionTally.TryRemove(System.Collections.IEnumerable)"> + <summary> + Try to remove a set of objects from the tally + </summary> + <param name="c">The objects to remove</param> + <returns>True if successful, false if any object was not found</returns> + </member> + <member name="P:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.CollectionTally.Count"> + <summary> + The number of objects remaining in the tally + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.EmptyCollectionConstraint"> + <summary> + EmptyCollectionConstraint tests whether a collection is empty. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Check that the collection is empty + </summary> + <param name="collection"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.UniqueItemsConstraint"> + <summary> + UniqueItemsConstraint tests whether all the items in a + collection are unique. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Check that all items are unique. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionContainsConstraint"> + <summary> + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.#ctor(System.Object)"> + <summary> + Construct a CollectionContainsConstraint + </summary> + <param name="expected"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Test whether the expected item is contained in the collection + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a descripton of the constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionEquivalentConstraint"> + <summary> + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.#ctor(System.Collections.IEnumerable)"> + <summary> + Construct a CollectionEquivalentConstraint + </summary> + <param name="expected"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Test whether two collections are equivalent + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionSubsetConstraint"> + <summary> + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.#ctor(System.Collections.IEnumerable)"> + <summary> + Construct a CollectionSubsetConstraint + </summary> + <param name="expected">The collection that the actual value is expected to be a subset of</param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Test whether the actual collection is a subset of + the expected collection provided. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionOrderedConstraint"> + <summary> + CollectionOrderedConstraint is used to test whether a collection is ordered. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.#ctor"> + <summary> + Construct a CollectionOrderedConstraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using(System.Collections.IComparer)"> + <summary> + Modifies the constraint to use an IComparer and returns self. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> + <summary> + Modifies the constraint to use an... [truncated message content] |
From: <te...@us...> - 2009-05-24 08:45:51
|
Revision: 4376 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4376&view=rev Author: tehlike Date: 2009-05-24 08:45:28 +0000 (Sun, 24 May 2009) Log Message: ----------- Removing [ExpectedException] Attribute as Assert.Throws does the work, and this causes exception in Gui&Console runner as well. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH496/Fixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH496/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH496/Fixture.cs 2009-05-24 06:28:33 UTC (rev 4375) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH496/Fixture.cs 2009-05-24 08:45:28 UTC (rev 4376) @@ -14,7 +14,6 @@ } [Test] - [ExpectedException(typeof(PropertyAccessException))] public void CRUD() { if (Environment.BytecodeProvider is NullBytecodeProvider) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 06:28:38
|
Revision: 4375 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4375&view=rev Author: fabiomaulo Date: 2009-05-24 06:28:33 +0000 (Sun, 24 May 2009) Log Message: ----------- Improved the context of each AdoException. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs trunk/nhibernate/src/NHibernate/Dialect/Lock/UpdateLockingStrategy.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs 2009-05-24 06:24:56 UTC (rev 4374) +++ trunk/nhibernate/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs 2009-05-24 06:28:33 UTC (rev 4375) @@ -95,8 +95,15 @@ } catch (Exception sqle) { - throw ADOExceptionHelper.Convert(session.Factory.SQLExceptionConverter, sqle, - "could not lock: " + MessageHelper.InfoString(lockable, id, factory), sql); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not lock: " + MessageHelper.InfoString(lockable, id, factory), + Sql = sql.ToString(), + EntityName = lockable.EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(session.Factory.SQLExceptionConverter, exceptionContext); } } Modified: trunk/nhibernate/src/NHibernate/Dialect/Lock/UpdateLockingStrategy.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Lock/UpdateLockingStrategy.cs 2009-05-24 06:24:56 UTC (rev 4374) +++ trunk/nhibernate/src/NHibernate/Dialect/Lock/UpdateLockingStrategy.cs 2009-05-24 06:28:33 UTC (rev 4375) @@ -107,8 +107,15 @@ } catch (Exception sqle) { - throw ADOExceptionHelper.Convert(factory.SQLExceptionConverter, sqle, - "could not lock: " + MessageHelper.InfoString(lockable, id, factory), sql); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not lock: " + MessageHelper.InfoString(lockable, id, factory), + Sql = sql.ToString(), + EntityName = lockable.EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(session.Factory.SQLExceptionConverter, exceptionContext); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 06:25:09
|
Revision: 4374 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4374&view=rev Author: fabiomaulo Date: 2009-05-24 06:24:56 +0000 (Sun, 24 May 2009) Log Message: ----------- Improved the context of each AdoException. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-24 06:13:38 UTC (rev 4373) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-24 06:24:56 UTC (rev 4374) @@ -1269,7 +1269,16 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "could not initialize lazy properties: " + MessageHelper.InfoString(this, id, Factory), SQLLazySelectString); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = + "could not initialize lazy properties: " + MessageHelper.InfoString(this, id, Factory), + Sql = SQLLazySelectString.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -1432,7 +1441,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "could not retrieve snapshot: " + MessageHelper.InfoString(this, id, Factory), SQLSnapshotSelectString); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not retrieve snapshot: " + MessageHelper.InfoString(this, id, Factory), + Sql = SQLSnapshotSelectString.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -1608,9 +1625,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, - "could not retrieve version: " + MessageHelper.InfoString(this, id, Factory), - VersionSelectString); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not retrieve version: " + MessageHelper.InfoString(this, id, Factory), + Sql = VersionSelectString.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } return nextVersion; } @@ -1664,9 +1687,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, - "could not retrieve version: " + MessageHelper.InfoString(this, id, Factory), - VersionSelectString); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not retrieve version: " + MessageHelper.InfoString(this, id, Factory), + Sql = VersionSelectString.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -2600,8 +2629,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, - "could not insert: " + MessageHelper.InfoString(this), sql.Text); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not insert: " + MessageHelper.InfoString(this), + Sql = sql.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -2845,7 +2881,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "could not delete: " + MessageHelper.InfoString(this, id, Factory), sql.Text); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not delete: " + MessageHelper.InfoString(this, id, Factory), + Sql = sql.Text.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -3892,8 +3936,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "unable to select generated column values", - selectionSQL); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "unable to select generated column values", + Sql = selectionSQL.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } @@ -3972,7 +4023,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "could not retrieve snapshot: " + MessageHelper.InfoString(this, id, Factory), sql); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not retrieve snapshot: " + MessageHelper.InfoString(this, id, Factory), + Sql = sql.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 06:13:44
|
Revision: 4373 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4373&view=rev Author: fabiomaulo Date: 2009-05-24 06:13:38 +0000 (Sun, 24 May 2009) Log Message: ----------- Fix NH-1553 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Exceptions/AdoExceptionContextInfo.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Person.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SQLUpdateConflictToStaleStateExceptionConverter.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs Modified: trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs 2009-05-24 05:24:03 UTC (rev 4372) +++ trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -12,8 +12,20 @@ { public const string SQLNotAvailable = "SQL not available"; + public static Exception Convert(ISQLExceptionConverter converter, AdoExceptionContextInfo exceptionContextInfo) + { + if(exceptionContextInfo == null) + { + throw new AssertionFailure("The argument exceptionContextInfo is null."); + } + var sql = TryGetActualSqlQuery(exceptionContextInfo.SqlException, exceptionContextInfo.Sql); + ADOExceptionReporter.LogExceptions(exceptionContextInfo.SqlException, + ExtendMessage(exceptionContextInfo.Message, sql, null, null)); + return converter.Convert(exceptionContextInfo); + } + /// <summary> - /// Converts the given SQLException into NHibernate's ADOException hierarchy, as well as performing + /// Converts the given SQLException into Exception hierarchy, as well as performing /// appropriate logging. /// </summary> /// <param name="converter">The converter to use.</param> @@ -24,14 +36,11 @@ public static Exception Convert(ISQLExceptionConverter converter, Exception sqlException, string message, SqlString sql) { - sql = TryGetActualSqlQuery(sqlException, sql); - ADOExceptionReporter.LogExceptions(sqlException, ExtendMessage(message, sql, null, null)); - return - converter.Convert(new AdoExceptionContextInfo {SqlException = sqlException, Message = message, Sql = sql.ToString()}); + return Convert(converter, new AdoExceptionContextInfo {SqlException = sqlException, Message = message, Sql = sql.ToString()}); } /// <summary> - /// Converts the given SQLException into NHibernate's ADOException hierarchy, as well as performing + /// Converts the given SQLException into Exception hierarchy, as well as performing /// appropriate logging. /// </summary> /// <param name="converter">The converter to use.</param> @@ -40,16 +49,15 @@ /// <returns> The converted <see cref="ADOException"/>.</returns> public static Exception Convert(ISQLExceptionConverter converter, Exception sqlException, string message) { - var sql = new SqlString(SQLNotAvailable); - sql = TryGetActualSqlQuery(sqlException, sql); - return Convert(converter, sqlException, message, sql); + var sql = TryGetActualSqlQuery(sqlException, SQLNotAvailable); + return Convert(converter, new AdoExceptionContextInfo {SqlException = sqlException, Message = message, Sql = sql}); } public static ADOException Convert(ISQLExceptionConverter converter, Exception sqle, string message, SqlString sql, object[] parameterValues, IDictionary<string, TypedValue> namedParameters) { sql = TryGetActualSqlQuery(sqle, sql); - string extendMessage = ExtendMessage(message, sql, parameterValues, namedParameters); + string extendMessage = ExtendMessage(message, sql.ToString(), parameterValues, namedParameters); ADOExceptionReporter.LogExceptions(sqle, extendMessage); return new ADOException(extendMessage, sqle, sql.ToString()); } @@ -69,7 +77,7 @@ return result; } - public static string ExtendMessage(string message, SqlString sql, object[] parameterValues, + public static string ExtendMessage(string message, string sql, object[] parameterValues, IDictionary<string, TypedValue> namedParameters) { var sb = new StringBuilder(); @@ -105,5 +113,11 @@ } return sql; } + + public static string TryGetActualSqlQuery(Exception sqle, string sql) + { + var query = (string)sqle.Data["actual-sql-query"]; + return query ?? sql; + } } } \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Exceptions/AdoExceptionContextInfo.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/AdoExceptionContextInfo.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Exceptions/AdoExceptionContextInfo.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -0,0 +1,40 @@ +using System; + +namespace NHibernate.Exceptions +{ + /// <summary> + /// Collect data of an <see cref="ADOException"/> to be converted. + /// </summary> + [Serializable] + public class AdoExceptionContextInfo + { + // This class was introduced, in NH, to allow less intrusive possible extensions + // of information given to the ISQLExceptionConverter + // (extensions of a class instead succesive changes of a method) + + /// <summary> + /// The <see cref="System.Data.Common.DbException"/> to be converted. + /// </summary> + public Exception SqlException { get; set; } + + /// <summary> + /// An optional error message. + /// </summary> + public string Message { get; set; } + + /// <summary> + /// The SQL that generate the exception + /// </summary> + public string Sql { get; set; } + + /// <summary> + /// Optional EntityName where available in the original exception context. + /// </summary> + public string EntityName { get; set; } + + /// <summary> + /// Optional EntityId where available in the original exception context. + /// </summary> + public object EntityId { get; set; } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs 2009-05-24 05:24:03 UTC (rev 4372) +++ trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -2,31 +2,6 @@ namespace NHibernate.Exceptions { - /// <summary> - /// Collect data of an <see cref="ADOException"/> to be converted. - /// </summary> - public class AdoExceptionContextInfo - { - // This class was introduced, in NH, to allow less intrusive possible extensions - // of information given to the ISQLExceptionConverter - // (extensions of a class instead succesive changes of a method) - - /// <summary> - /// The <see cref="System.Data.Common.DbException"/> to be converted. - /// </summary> - public Exception SqlException { get; set; } - - /// <summary> - /// An optional error message. - /// </summary> - public string Message { get; set; } - - /// <summary> - /// The SQL that generate the exception - /// </summary> - public string Sql { get; set; } - } - /// <summary> /// Defines a contract for implementations that know how to convert a <see cref="System.Data.Common.DbException"/> /// into NHibernate's <see cref="ADOException"/> hierarchy. Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-05-24 05:24:03 UTC (rev 4372) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-05-24 06:13:38 UTC (rev 4373) @@ -478,6 +478,7 @@ <Compile Include="EntityModeEqualityComparer.cs" /> <Compile Include="Event\AbstractPreDatabaseOperationEvent.cs" /> <Compile Include="Event\IDestructible.cs" /> + <Compile Include="Exceptions\AdoExceptionContextInfo.cs" /> <Compile Include="Exceptions\ReflectionBasedSqlStateExtracter.cs" /> <Compile Include="Exceptions\SqlStateExtracter.cs" /> <Compile Include="Exceptions\TemplatedViolatedConstraintNameExtracter.cs" /> Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-24 05:24:03 UTC (rev 4372) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -2727,7 +2727,15 @@ } catch (DbException sqle) { - throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqle, "could not update: " + MessageHelper.InfoString(this, id, Factory), sql.Text); + var exceptionContext = new AdoExceptionContextInfo + { + SqlException = sqle, + Message = "could not update: " + MessageHelper.InfoString(this, id, Factory), + Sql = sql.Text.ToString(), + EntityName = EntityName, + EntityId = id + }; + throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, exceptionContext); } } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Mappings.hbm.xml 2009-05-24 06:13:38 UTC (rev 4373) @@ -0,0 +1,19 @@ +<?xml version="1.0" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH1553.MsSQL"> + + + <class name="Person"> + <id name="Id" column="Id" type="long"> + <generator class="identity" /> + </id> + + <version name="Version" column="Version" type="long" /> + + <property name="IdentificationNumber" column="IdentificationNumber" type="long" /> + + </class> + + +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Person.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Person.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/Person.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -0,0 +1,14 @@ +namespace NHibernate.Test.NHSpecificTest.NH1553.MsSQL +{ + /// <summary> + /// A simple entity for the test. + /// </summary> + public class Person + { + public virtual long Id { get; set; } + + public virtual long Version { get; set; } + + public virtual long IdentificationNumber { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SQLUpdateConflictToStaleStateExceptionConverter.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SQLUpdateConflictToStaleStateExceptionConverter.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SQLUpdateConflictToStaleStateExceptionConverter.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -0,0 +1,23 @@ +using System; +using System.Data.SqlClient; +using NHibernate.Exceptions; + +namespace NHibernate.Test.NHSpecificTest.NH1553.MsSQL +{ + /// <summary> + /// Exception converter to convert SQL Snapshot isolation update conflict to + /// StaleObjectStateException + /// </summary> + public class SQLUpdateConflictToStaleStateExceptionConverter : ISQLExceptionConverter + { + public Exception Convert(AdoExceptionContextInfo exInfo) + { + var sqle = ADOExceptionHelper.ExtractDbException(exInfo.SqlException) as SqlException; + if ((sqle != null) && (sqle.Number == 3960)) + { + return new StaleObjectStateException(exInfo.EntityName, exInfo.EntityId); + } + return SQLStateConverter.HandledNonSpecificException(exInfo.SqlException, exInfo.Message, exInfo.Sql); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs 2009-05-24 06:13:38 UTC (rev 4373) @@ -0,0 +1,180 @@ +using System.Data; +using NHibernate.Cfg; +using NHibernate.Dialect; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1553.MsSQL +{ + /// <summary> + /// Test fixture for NH1553, which checks update conflict detection together with snapshot isolation transaction isolation level. + /// </summary> + [TestFixture] + public class SnapshotIsolationUpdateConflictTest : BugTestCase + { + private Person person; + + public override string BugNumber + { + get { return "NH1553.MsSQL"; } + } + + private ITransaction BeginTransaction(ISession session) + { + return session.BeginTransaction(IsolationLevel.Snapshot); + } + + private Person LoadPerson() + { + using (ISession session = OpenSession()) + { + using (ITransaction tr = BeginTransaction(session)) + { + var p = session.Get<Person>(person.Id); + tr.Commit(); + return p; + } + } + } + + private void SavePerson(Person p) + { + using (ISession session = OpenSession()) + { + using (ITransaction tr = BeginTransaction(session)) + { + session.SaveOrUpdate(p); + session.Flush(); + tr.Commit(); + } + } + } + + /// <summary> + /// Tests, that NHibernate detects the update conflict and returns a StaleObjectStateException as expected. + /// This behaviour is part of the standard NHibernate feature set. + /// </summary> + [Test] + public void UpdateConflictDetectedByNH() + { + Person p1 = LoadPerson(); + Person p2 = LoadPerson(); + + p1.IdentificationNumber++; + p2.IdentificationNumber += 2; + + SavePerson(p1); + Assert.AreEqual(person.Version + 1, p1.Version); + try + { + SavePerson(p2); + Assert.Fail("Expecting stale object state exception"); + } + catch (StaleObjectStateException sose) + { + Assert.AreEqual(typeof (Person).FullName, sose.EntityName); + Assert.AreEqual(p2.Id, sose.Identifier); + // as expected. + } + } + + /// <summary> + /// Tests, that the extension provided wraps the returned SQL Exception inside a StaleObjectStateException, + /// if the SQL Server detects an update conflict in snapshot isolation. + /// </summary> + [Test] + public void UpdateConflictDetectedBySQLServer() + { + Person p1 = LoadPerson(); + + p1.IdentificationNumber++; + + using (ISession session1 = OpenSession()) + { + using (ITransaction tr1 = BeginTransaction(session1)) + { + session1.SaveOrUpdate(p1); + session1.Flush(); + + using (ISession session2 = OpenSession()) + { + using (ITransaction tr2 = BeginTransaction(session2)) + { + var p2 = session2.Get<Person>(person.Id); + p2.IdentificationNumber += 2; + + tr1.Commit(); + Assert.AreEqual(person.Version + 1, p1.Version); + + try + { + session2.SaveOrUpdate(p2); + session2.Flush(); + + tr2.Commit(); + Assert.Fail("StaleObjectStateException expected"); + } + catch (StaleObjectStateException sose) + { + Assert.AreEqual(typeof (Person).FullName, sose.EntityName); + Assert.AreEqual(p2.Id, sose.Identifier); + // as expected + } + } + } + } + } + } + + protected override bool AppliesTo(Dialect.Dialect dialect) + { + return dialect is MsSql2005Dialect || dialect is MsSql2008Dialect; + } + + private void SetAllowSnapshotIsolation(bool on) + { + using (ISession session = OpenSession()) + { + IDbCommand command = session.Connection.CreateCommand(); + command.CommandText = "ALTER DATABASE " + session.Connection.Database + " set allow_snapshot_isolation " + + (on ? "on" : "off"); + command.ExecuteNonQuery(); + } + } + + protected override void OnSetUp() + { + base.OnSetUp(); + + SetAllowSnapshotIsolation(true); + + person = new Person(); + person.IdentificationNumber = 123; + SavePerson(person); + } + + protected override void OnTearDown() + { + using (ISession session = OpenSession()) + { + using (ITransaction tr = session.BeginTransaction(IsolationLevel.Serializable)) + { + string hql = "from Person"; + session.Delete(hql); + session.Flush(); + tr.Commit(); + } + } + + SetAllowSnapshotIsolation(false); + + base.OnTearDown(); + } + + protected override void Configure(Configuration configuration) + { + base.Configure(configuration); + configuration.SetProperty(Environment.SqlExceptionConverter, + typeof (SQLUpdateConflictToStaleStateExceptionConverter).AssemblyQualifiedName); + } + } +} \ 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-24 05:24:03 UTC (rev 4372) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-05-24 06:13:38 UTC (rev 4373) @@ -356,6 +356,9 @@ <Compile Include="NHSpecificTest\NH1343\Product.cs" /> <Compile Include="NHSpecificTest\NH1343\ProductFixture.cs" /> <Compile Include="NHSpecificTest\NH1388\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1553\MsSQL\Person.cs" /> + <Compile Include="NHSpecificTest\NH1553\MsSQL\SnapshotIsolationUpdateConflictTest.cs" /> + <Compile Include="NHSpecificTest\NH1553\MsSQL\SQLUpdateConflictToStaleStateExceptionConverter.cs" /> <Compile Include="NHSpecificTest\NH1574\Principal.cs" /> <Compile Include="NHSpecificTest\NH1574\SpecializedPrincipal.cs" /> <Compile Include="NHSpecificTest\NH1574\SpecializedTeaml.cs" /> @@ -1831,6 +1834,7 @@ <EmbeddedResource Include="Ado\VerySimple.hbm.xml" /> <EmbeddedResource Include="Ado\AlmostSimple.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1553\MsSQL\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1788\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1794\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1792\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-24 05:24:08
|
Revision: 4372 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4372&view=rev Author: fabiomaulo Date: 2009-05-24 05:24:03 +0000 (Sun, 24 May 2009) Log Message: ----------- Improved ISQLExceptionConverter for future extensions Modified Paths: -------------- trunk/nhibernate/releasenotes.txt trunk/nhibernate/src/NHibernate/ADOException.cs trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs trunk/nhibernate/src/NHibernate/Exceptions/ADOConnectionException.cs trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs trunk/nhibernate/src/NHibernate/Exceptions/ConstraintViolationException.cs trunk/nhibernate/src/NHibernate/Exceptions/DataException.cs trunk/nhibernate/src/NHibernate/Exceptions/GenericADOException.cs trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs trunk/nhibernate/src/NHibernate/Exceptions/LockAcquisitionException.cs trunk/nhibernate/src/NHibernate/Exceptions/SQLExceptionConverterFactory.cs trunk/nhibernate/src/NHibernate/Exceptions/SQLGrammarException.cs trunk/nhibernate/src/NHibernate/Exceptions/SQLStateConverter.cs trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/MSSQLExceptionConverterExample.cs trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/OracleClientExceptionConverterExample.cs trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/PostgresExceptionConverterExample.cs trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/releasenotes.txt 2009-05-24 05:24:03 UTC (rev 4372) @@ -29,6 +29,8 @@ * CriteriaUtil is gone. NHibernate.Transform.Transformers now returns predefined IResultTransformer. * ISessionFactory.Settings is gone (moved to ISessionFactoryImplementor.Settings) * Obsolete ORACLE dialects was removed (new implementations are available) + * ISQLExceptionConverter was changed in order to have more flexibility about information available for the conversion and followed management. + * ADOException now use string instead SqlString Build 2.1.0.Alpha2 (rev4167) ======================== Modified: trunk/nhibernate/src/NHibernate/ADOException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/ADOException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/ADOException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,7 +1,6 @@ using System; using System.Runtime.Serialization; using System.Security.Permissions; -using NHibernate.SqlCommand; namespace NHibernate { @@ -16,7 +15,7 @@ [Serializable] public class ADOException : HibernateException { - private readonly SqlString sql; + private readonly string sql; /// <summary> /// Initializes a new instance of the <see cref="ADOException"/> class. @@ -31,7 +30,7 @@ { } - public ADOException(string message, Exception innerException, SqlString sql) + public ADOException(string message, Exception innerException, string sql) : base(message + "[SQL: " + sql + "]", innerException) { this.sql = sql; @@ -49,7 +48,7 @@ /// </param> protected ADOException(SerializationInfo info, StreamingContext context) : base(info, context) { - this.sql = (SqlString) info.GetValue("sql", typeof(SqlString)); + this.sql = (string) info.GetValue("sql", typeof(string)); } [SecurityPermission(SecurityAction.LinkDemand, @@ -60,7 +59,7 @@ info.AddValue("sql", sql); } - public SqlString SqlString + public string SqlString { get { return sql; } } Modified: trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -501,7 +501,7 @@ get { return commandsToClose.Count > 0 || readersToClose.Count > 0; } } - protected ADOException Convert(Exception sqlException, string message) + protected Exception Convert(Exception sqlException, string message) { return ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, sqlException, message); } Modified: trunk/nhibernate/src/NHibernate/Exceptions/ADOConnectionException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ADOConnectionException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/ADOConnectionException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,6 +1,5 @@ using System; using System.Runtime.Serialization; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -12,7 +11,7 @@ public class ADOConnectionException : ADOException { public ADOConnectionException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public ADOConnectionException(string message, Exception innerException, SqlString sql) : base(message, innerException, sql) {} + public ADOConnectionException(string message, Exception innerException, string sql) : base(message, innerException, sql) {} public ADOConnectionException(string message, Exception innerException) : base(message, innerException) {} } } Modified: trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/ADOExceptionHelper.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -21,12 +21,13 @@ /// <param name="message">An optional error message.</param> /// <param name="sql">The SQL executed.</param> /// <returns> The converted <see cref="ADOException"/>.</returns> - public static ADOException Convert(ISQLExceptionConverter converter, Exception sqlException, string message, + public static Exception Convert(ISQLExceptionConverter converter, Exception sqlException, string message, SqlString sql) { sql = TryGetActualSqlQuery(sqlException, sql); ADOExceptionReporter.LogExceptions(sqlException, ExtendMessage(message, sql, null, null)); - return converter.Convert(sqlException, message, sql); + return + converter.Convert(new AdoExceptionContextInfo {SqlException = sqlException, Message = message, Sql = sql.ToString()}); } /// <summary> @@ -37,7 +38,7 @@ /// <param name="sqlException">The exception to convert.</param> /// <param name="message">An optional error message.</param> /// <returns> The converted <see cref="ADOException"/>.</returns> - public static ADOException Convert(ISQLExceptionConverter converter, Exception sqlException, string message) + public static Exception Convert(ISQLExceptionConverter converter, Exception sqlException, string message) { var sql = new SqlString(SQLNotAvailable); sql = TryGetActualSqlQuery(sqlException, sql); @@ -50,7 +51,7 @@ sql = TryGetActualSqlQuery(sqle, sql); string extendMessage = ExtendMessage(message, sql, parameterValues, namedParameters); ADOExceptionReporter.LogExceptions(sqle, extendMessage); - return new ADOException(extendMessage, sqle, sql); + return new ADOException(extendMessage, sqle, sql.ToString()); } /// <summary> For the given <see cref="Exception"/>, locates the <see cref="System.Data.Common.DbException"/>. </summary> Modified: trunk/nhibernate/src/NHibernate/Exceptions/ConstraintViolationException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ConstraintViolationException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/ConstraintViolationException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,6 +1,5 @@ using System; using System.Runtime.Serialization; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -15,7 +14,7 @@ public ConstraintViolationException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public ConstraintViolationException(string message, Exception innerException, SqlString sql, string constraintName) + public ConstraintViolationException(string message, Exception innerException, string sql, string constraintName) : base(message, innerException, sql) { this.constraintName = constraintName; Modified: trunk/nhibernate/src/NHibernate/Exceptions/DataException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/DataException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/DataException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,6 +1,5 @@ using System; using System.Runtime.Serialization; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -13,7 +12,7 @@ public class DataException : ADOException { public DataException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public DataException(string message, Exception innerException, SqlString sql) : base(message, innerException, sql) {} + public DataException(string message, Exception innerException, string sql) : base(message, innerException, sql) {} public DataException(string message, Exception innerException) : base(message, innerException) {} } } Modified: trunk/nhibernate/src/NHibernate/Exceptions/GenericADOException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/GenericADOException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/GenericADOException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -8,7 +8,7 @@ public class GenericADOException : ADOException { public GenericADOException(SerializationInfo info, StreamingContext context) : base(info, context) { } - public GenericADOException(string message, Exception innerException, SqlString sql) : base(message, innerException, sql) { } + public GenericADOException(string message, Exception innerException, string sql) : base(message, innerException, sql) { } public GenericADOException(string message, Exception innerException) : base(message, innerException) { } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/ISQLExceptionConverter.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,8 +1,32 @@ using System; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { + /// <summary> + /// Collect data of an <see cref="ADOException"/> to be converted. + /// </summary> + public class AdoExceptionContextInfo + { + // This class was introduced, in NH, to allow less intrusive possible extensions + // of information given to the ISQLExceptionConverter + // (extensions of a class instead succesive changes of a method) + + /// <summary> + /// The <see cref="System.Data.Common.DbException"/> to be converted. + /// </summary> + public Exception SqlException { get; set; } + + /// <summary> + /// An optional error message. + /// </summary> + public string Message { get; set; } + + /// <summary> + /// The SQL that generate the exception + /// </summary> + public string Sql { get; set; } + } + /// <summary> /// Defines a contract for implementations that know how to convert a <see cref="System.Data.Common.DbException"/> /// into NHibernate's <see cref="ADOException"/> hierarchy. @@ -20,12 +44,10 @@ public interface ISQLExceptionConverter { /// <summary> - /// Convert the given <see cref="System.Data.Common.DbException"/> into NHibernate's ADOException hierarchy. + /// Convert the given <see cref="System.Data.Common.DbException"/> into custom Exception. /// </summary> - /// <param name="sqlException">The <see cref="System.Data.Common.DbException"/> to be converted. </param> - /// <param name="message"> An optional error message. </param> - /// <param name="sql">The SQL that generate the exception</param> - /// <returns> The resulting ADOException. </returns> - ADOException Convert(Exception sqlException, string message, SqlString sql); + /// <param name="adoExceptionContextInfo">Available information during exception throw.</param> + /// <returns> The resulting Exception to throw. </returns> + Exception Convert(AdoExceptionContextInfo adoExceptionContextInfo); } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Exceptions/LockAcquisitionException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/LockAcquisitionException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/LockAcquisitionException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,6 +1,5 @@ using System; using System.Runtime.Serialization; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -12,7 +11,7 @@ public class LockAcquisitionException : ADOException { public LockAcquisitionException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public LockAcquisitionException(string message, Exception innerException, SqlString sql) : base(message, innerException, sql) {} + public LockAcquisitionException(string message, Exception innerException, string sql) : base(message, innerException, sql) {} public LockAcquisitionException(string message, Exception innerException) : base(message, innerException) {} } } Modified: trunk/nhibernate/src/NHibernate/Exceptions/SQLExceptionConverterFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/SQLExceptionConverterFactory.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/SQLExceptionConverterFactory.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Reflection; using log4net; -using NHibernate.SqlCommand; using NHibernate.Util; namespace NHibernate.Exceptions @@ -16,9 +15,9 @@ { #region ISQLExceptionConverter Members - public ADOException Convert(Exception sqlException, string message, SqlString sql) + public Exception Convert(AdoExceptionContextInfo exceptionContextInfo) { - throw new GenericADOException(message, sqlException, sql); + throw new GenericADOException(exceptionContextInfo.Message, exceptionContextInfo.SqlException, exceptionContextInfo.Sql); } #endregion Modified: trunk/nhibernate/src/NHibernate/Exceptions/SQLGrammarException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/SQLGrammarException.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/SQLGrammarException.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,6 +1,5 @@ using System; using System.Runtime.Serialization; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -12,7 +11,7 @@ public class SQLGrammarException : ADOException { public SQLGrammarException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public SQLGrammarException(string message, Exception innerException, SqlString sql) : base(message, innerException, sql) {} + public SQLGrammarException(string message, Exception innerException, string sql) : base(message, innerException, sql) {} public SQLGrammarException(string message, Exception innerException) : base(message, innerException) {} } } Modified: trunk/nhibernate/src/NHibernate/Exceptions/SQLStateConverter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Exceptions/SQLStateConverter.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Exceptions/SQLStateConverter.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,5 +1,4 @@ using System; -using NHibernate.SqlCommand; namespace NHibernate.Exceptions { @@ -19,7 +18,7 @@ #region ISQLExceptionConverter Members - public ADOException Convert(Exception sqlException, string message, SqlString sql) + public Exception Convert(AdoExceptionContextInfo exceptionInfo) { /* * So far I know we don't have something similar to "X/Open-compliant SQLState" in .NET @@ -27,7 +26,7 @@ * and its own IViolatedConstraintNameExtracter if needed. * The System.Data.Common.DbException, of .NET2.0, don't give us something applicable to all dialects. */ - return HandledNonSpecificException(sqlException, message, sql); + return HandledNonSpecificException(exceptionInfo.SqlException, exceptionInfo.Message, exceptionInfo.Sql); } #endregion @@ -37,7 +36,7 @@ /// <param name="message">An optional message </param> /// <param name="sql">Optionally, the sql being performed when the exception occurred. </param> /// <returns> The converted exception; should <b>never</b> be null. </returns> - public static ADOException HandledNonSpecificException(Exception sqlException, string message, SqlString sql) + public static ADOException HandledNonSpecificException(Exception sqlException, string message, string sql) { return new GenericADOException(message, sqlException, sql); } Modified: trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Data; -using System.Transactions; using NHibernate.AdoNet; using NHibernate.Collection; using NHibernate.Engine; @@ -285,7 +284,7 @@ } } - protected ADOException Convert(Exception sqlException, string message) + protected Exception Convert(Exception sqlException, string message) { using (new SessionIdLoggingContext(SessionId)) { Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/MSSQLExceptionConverterExample.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/MSSQLExceptionConverterExample.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/MSSQLExceptionConverterExample.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,7 +1,6 @@ using System; using System.Data.SqlClient; using NHibernate.Exceptions; -using NHibernate.SqlCommand; namespace NHibernate.Test.ExceptionsTest { @@ -11,17 +10,17 @@ { #region ISQLExceptionConverter Members - public ADOException Convert(Exception sqlException, string message, SqlString sql) + public Exception Convert(AdoExceptionContextInfo exInfo) { - SqlException sqle = ADOExceptionHelper.ExtractDbException(sqlException) as SqlException; + SqlException sqle = ADOExceptionHelper.ExtractDbException(exInfo.SqlException) as SqlException; if(sqle != null) { if (sqle.Number == 547) - return new ConstraintViolationException(message, sqle.InnerException, sql, null); + return new ConstraintViolationException(exInfo.Message, sqle.InnerException, exInfo.Sql, null); if (sqle.Number == 208) - return new SQLGrammarException(message, sqle.InnerException, sql); + return new SQLGrammarException(exInfo.Message, sqle.InnerException, exInfo.Sql); } - return SQLStateConverter.HandledNonSpecificException(sqlException, message, sql); + return SQLStateConverter.HandledNonSpecificException(exInfo.SqlException, exInfo.Message, exInfo.Sql); } #endregion Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/OracleClientExceptionConverterExample.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/OracleClientExceptionConverterExample.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/OracleClientExceptionConverterExample.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,7 +1,6 @@ using System; using System.Data.OracleClient; using NHibernate.Exceptions; -using NHibernate.SqlCommand; namespace NHibernate.Test.ExceptionsTest { @@ -9,21 +8,21 @@ { #region ISQLExceptionConverter Members - public ADOException Convert(Exception sqlException, string message, SqlString sql) + public Exception Convert(AdoExceptionContextInfo exInfo) { - var sqle = ADOExceptionHelper.ExtractDbException(sqlException) as OracleException; + var sqle = ADOExceptionHelper.ExtractDbException(exInfo.SqlException) as OracleException; if (sqle != null) { if (sqle.Code == 1036) { - return new ConstraintViolationException(message, sqle.InnerException, sql, null); + return new ConstraintViolationException(exInfo.Message, sqle.InnerException, exInfo.Sql, null); } if (sqle.Code == 942) { - return new SQLGrammarException(message, sqle.InnerException, sql); + return new SQLGrammarException(exInfo.Message, sqle.InnerException, exInfo.Sql); } } - return SQLStateConverter.HandledNonSpecificException(sqlException, message, sql); + return SQLStateConverter.HandledNonSpecificException(exInfo.SqlException, exInfo.Message, exInfo.Sql); } #endregion Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/PostgresExceptionConverterExample.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/PostgresExceptionConverterExample.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/PostgresExceptionConverterExample.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -1,30 +1,28 @@ using System; using System.Data.Common; -using NHibernate; using NHibernate.Exceptions; -using NHibernate.SqlCommand; public class PostgresExceptionConverterExample : ISQLExceptionConverter { #region ISQLExceptionConverter Members - public ADOException Convert(Exception sqlException, string message, SqlString sql) + public Exception Convert(AdoExceptionContextInfo exInfo) { - var sqle = ADOExceptionHelper.ExtractDbException(sqlException) as DbException; + var sqle = ADOExceptionHelper.ExtractDbException(exInfo.SqlException) as DbException; if (sqle != null) { string code = (string) sqle.GetType().GetProperty("Code").GetValue(sqle, null); if (code == "23503") { - return new ConstraintViolationException(message, sqle.InnerException, sql, null); + return new ConstraintViolationException(exInfo.Message, sqle.InnerException, exInfo.Sql, null); } if (code == "42P01") { - return new SQLGrammarException(message, sqle.InnerException, sql); + return new SQLGrammarException(exInfo.Message, sqle.InnerException, exInfo.Sql); } } - return SQLStateConverter.HandledNonSpecificException(sqlException, message, sql); + return SQLStateConverter.HandledNonSpecificException(exInfo.SqlException, exInfo.Message, exInfo.Sql); } #endregion Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2009-05-23 23:18:48 UTC (rev 4371) +++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2009-05-24 05:24:03 UTC (rev 4372) @@ -79,7 +79,7 @@ catch (Exception sqle) { ADOExceptionReporter.LogExceptions(sqle, "Just output!!!!"); - ADOException adoException = converter.Convert(sqle, null, null); + Exception adoException = converter.Convert(new AdoExceptionContextInfo{SqlException = sqle}); Assert.AreEqual(typeof(ConstraintViolationException), adoException.GetType(), "Bad conversion [" + sqle.Message + "]"); ConstraintViolationException ex = (ConstraintViolationException)adoException; @@ -126,7 +126,9 @@ } catch (Exception sqle) { - Assert.AreEqual(typeof(SQLGrammarException), converter.Convert(sqle, null, null).GetType(), "Bad conversion [" + sqle.Message + "]"); + Assert.AreEqual(typeof (SQLGrammarException), + converter.Convert(new AdoExceptionContextInfo {SqlException = sqle}).GetType(), + "Bad conversion [" + sqle.Message + "]"); } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-23 23:18:56
|
Revision: 4371 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4371&view=rev Author: fabiomaulo Date: 2009-05-23 23:18:48 +0000 (Sat, 23 May 2009) Log Message: ----------- Folder where put externals tools (as nunit test runner for NAnt task for example) Added Paths: ----------- trunk/nhibernate/Tools/ Property changes on: trunk/nhibernate/Tools ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-23 05:19:10
|
Revision: 4370 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4370&view=rev Author: fabiomaulo Date: 2009-05-23 05:18:39 +0000 (Sat, 23 May 2009) Log Message: ----------- Fix NH-1797 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-05-23 05:17:40 UTC (rev 4369) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-05-23 05:18:39 UTC (rev 4370) @@ -44,6 +44,12 @@ /// </remarks> public override SqlString GetLimitString(SqlString querySqlString, int offset, int last) { + //dont do this paging code if there is no offset, use the + //sql 2000 dialect since it wont just uses a top statement + if (offset == 0) + { + return base.GetLimitString(querySqlString, offset, last); + } // we have to do this in order to support parameters in order clause, the foramt // that sql 2005 uses for paging means that we move the parameters around, which means, // that positions are lost, so we record them before making any changes. Modified: trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs 2009-05-23 05:17:40 UTC (rev 4369) +++ trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs 2009-05-23 05:18:39 UTC (rev 4370) @@ -15,28 +15,28 @@ { MsSql2005Dialect d = new MsSql2005Dialect(); - SqlString str = d.GetLimitString(new SqlString("select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_ from dbo.Contact c where COALESCE(c.Rating, 0) > 0 order by c.Rating desc , c.Last_Name , c.First_Name"), 0, 10); + SqlString str = d.GetLimitString(new SqlString("select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_ from dbo.Contact c where COALESCE(c.Rating, 0) > 0 order by c.Rating desc , c.Last_Name , c.First_Name"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 Contact1_19_0_, Rating2_19_0_ FROM (select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_, ROW_NUMBER() OVER(ORDER BY c.Rating DESC, c.Last_Name, c.First_Name) as __hibernate_sort_row from dbo.Contact c where COALESCE(c.Rating, 0) > 0) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 Contact1_19_0_, Rating2_19_0_ FROM (select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_, ROW_NUMBER() OVER(ORDER BY c.Rating DESC, c.Last_Name, c.First_Name) as __hibernate_sort_row from dbo.Contact c where COALESCE(c.Rating, 0) > 0) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT fish.id FROM fish"), 0, 10); + str = d.GetLimitString(new SqlString("SELECT fish.id FROM fish"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 id FROM (SELECT fish.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 id FROM (SELECT fish.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id FROM fish fish_"), 0, 10); + str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id FROM fish fish_"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 id FROM (SELECT DISTINCT fish_.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 id FROM (SELECT DISTINCT fish_.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id as ixx9_ FROM fish fish_"), 0, 10); + str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id as ixx9_ FROM fish fish_"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 ixx9_ FROM (SELECT DISTINCT fish_.id as ixx9_, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 ixx9_ FROM (SELECT DISTINCT fish_.id as ixx9_, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT * FROM fish ORDER BY name"), 5, 15); @@ -59,40 +59,51 @@ "SELECT TOP 20 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name DESC) as __hibernate_sort_row FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t) as query WHERE query.__hibernate_sort_row > 10 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count FROM fish"), 0, 10); + str = d.GetLimitString(new SqlString("SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count FROM fish"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 *, some_count FROM (SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 *, some_count FROM (SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT * FROM fish WHERE scales = ", Parameter.Placeholder), 0, 10); + str = d.GetLimitString(new SqlString("SELECT * FROM fish WHERE scales = ", Parameter.Placeholder), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish WHERE scales = ?) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish WHERE scales = ?) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); - str = d.GetLimitString(new SqlString("SELECT f.Type, COUNT(DISTINCT f.Name) AS Name FROM Fish f GROUP BY f.Type ORDER BY COUNT(DISTINCT f.Name)"), 0, 10); + str = d.GetLimitString(new SqlString("SELECT f.Type, COUNT(DISTINCT f.Name) AS Name FROM Fish f GROUP BY f.Type ORDER BY COUNT(DISTINCT f.Name)"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 Type, Name FROM (SELECT f.Type, COUNT(DISTINCT f.Name) AS Name, ROW_NUMBER() OVER(ORDER BY COUNT(DISTINCT f.Name)) as __hibernate_sort_row FROM Fish f GROUP BY f.Type) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 Type, Name FROM (SELECT f.Type, COUNT(DISTINCT f.Name) AS Name, ROW_NUMBER() OVER(ORDER BY COUNT(DISTINCT f.Name)) as __hibernate_sort_row FROM Fish f GROUP BY f.Type) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); } [Test] + [Description("should use only TOP clause if there is no offset")] + public void OnlyOffsetLimit() + { + var d = new MsSql2005Dialect(); + + SqlString str = d.GetLimitString(new SqlString("select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_ from dbo.Contact c where COALESCE(c.Rating, 0) > 0 order by c.Rating desc , c.Last_Name , c.First_Name"), 0, 10); + System.Console.WriteLine(str); + Assert.That(str.ToString(), Is.EqualTo("select distinct top 10 c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_ from dbo.Contact c where COALESCE(c.Rating, 0) > 0 order by c.Rating desc , c.Last_Name , c.First_Name")); + } + + [Test] public void NH1187() { MsSql2005Dialect d = new MsSql2005Dialect(); SqlString result = - d.GetLimitString(new SqlString("select concat(a.Description,', ', a.Description) as desc from Animal a"), 0, 10); + d.GetLimitString(new SqlString("select concat(a.Description,', ', a.Description) as desc from Animal a"), 1, 10); System.Console.WriteLine(result); - Assert.AreEqual("SELECT TOP 10 desc FROM (select concat(a.Description,', ', a.Description) as desc, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row from Animal a) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", result.ToString()); + Assert.AreEqual("SELECT TOP 10 desc FROM (select concat(a.Description,', ', a.Description) as desc, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row from Animal a) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", result.ToString()); // The test use the function "cast" because cast need the keyWork "as" too SqlString str = - d.GetLimitString(new SqlString("SELECT fish.id, cast('astring, with,comma' as string) as bar FROM fish"), 0, 10); + d.GetLimitString(new SqlString("SELECT fish.id, cast('astring, with,comma' as string) as bar FROM fish"), 1, 10); System.Console.WriteLine(str); Assert.AreEqual( - "SELECT TOP 10 id, bar FROM (SELECT fish.id, cast('astring, with,comma' as string) as bar, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 0 ORDER BY query.__hibernate_sort_row", + "SELECT TOP 10 id, bar FROM (SELECT fish.id, cast('astring, with,comma' as string) as bar, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); } [Test] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-23 05:17:51
|
Revision: 4369 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4369&view=rev Author: fabiomaulo Date: 2009-05-23 05:17:40 +0000 (Sat, 23 May 2009) Log Message: ----------- Wrong test ignored (fixed) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2009-05-23 05:01:37 UTC (rev 4368) +++ trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2009-05-23 05:17:40 UTC (rev 4369) @@ -86,7 +86,7 @@ Cleanup(); } - [Test] + [Test, Ignore("Not fixed yet.")] [Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")] public void SqlClientOneRoundTripForUpdateAndInsert() { @@ -124,33 +124,16 @@ Cleanup(); } - [Test, Ignore("Not fixed yet.")] + [Test] [Description("SqlClient: The batcher log output should be formatted")] public void BatchedoutputShouldBeFormatted() { if (sessions.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false) Assert.Ignore("This test is for SqlClientBatchingBatcher only"); - FillDb(); - using (var sqlLog = new SqlLogSpy()) - using (ISession s = sessions.OpenSession()) - using (ITransaction tx = s.BeginTransaction()) { - s.Save(new VerySimple - { - Name = "test441", - Weight = 894 - }); - - s.Save(new AlmostSimple - { - Name = "test441", - Weight = 894 - }); - - tx.Commit(); - + FillDb(); var log = sqlLog.GetWholeLog(); Assert.IsTrue(log.Contains("INSERT \n INTO")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-23 05:01:50
|
Revision: 4368 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4368&view=rev Author: fabiomaulo Date: 2009-05-23 05:01:37 +0000 (Sat, 23 May 2009) Log Message: ----------- Activated the batcher as default for our tests Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/App.config Modified: trunk/nhibernate/src/NHibernate.Test/App.config =================================================================== --- trunk/nhibernate/src/NHibernate.Test/App.config 2009-05-23 04:59:13 UTC (rev 4367) +++ trunk/nhibernate/src/NHibernate.Test/App.config 2009-05-23 05:01:37 UTC (rev 4368) @@ -52,6 +52,7 @@ Enumeration documentation. Use the member names - not the values. --> + <property name="adonet.batch_size">10</property> <property name="connection.isolation">ReadCommitted</property> <property name="format_sql">true</property> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-05-23 04:59:29
|
Revision: 4367 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4367&view=rev Author: fabiomaulo Date: 2009-05-23 04:59:13 +0000 (Sat, 23 May 2009) Log Message: ----------- Revert NH-1790 (only the part that change the base behavior of the AbstractBatcher) See comments on JIRA issue. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs Modified: trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs 2009-05-22 23:35:49 UTC (rev 4366) +++ trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs 2009-05-23 04:59:13 UTC (rev 4367) @@ -80,12 +80,5 @@ totalExpectedRowsAffected = 0; currentBatch = new SqlClientSqlCommandSet(); } - - protected override void OnPreparedCommand() - { - // SQL Server batching can handle several different commands, and - // that gives us a nice perf boost when mixing different queries for - // batching - } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2009-05-22 23:35:49 UTC (rev 4366) +++ trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2009-05-23 04:59:13 UTC (rev 4367) @@ -124,7 +124,7 @@ Cleanup(); } - [Test] + [Test, Ignore("Not fixed yet.")] [Description("SqlClient: The batcher log output should be formatted")] public void BatchedoutputShouldBeFormatted() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aye...@us...> - 2009-05-22 23:35:54
|
Revision: 4366 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4366&view=rev Author: ayenderahien Date: 2009-05-22 23:35:49 +0000 (Fri, 22 May 2009) Log Message: ----------- Fixing NH-1788 - version column updatability is not taken into account when updating using dynamic-update Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Person.cs Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-22 23:32:10 UTC (rev 4365) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-05-22 23:35:49 UTC (rev 4366) @@ -3416,6 +3416,7 @@ if (IsVersioned) { propsToUpdate[VersionProperty] = + PropertyUpdateability[VersionProperty] && Versioning.IsVersionIncrementRequired(dirtyProperties, hasDirtyCollection, PropertyVersionability); } Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788 ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Fixture.cs 2009-05-22 23:35:49 UTC (rev 4366) @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using NHibernate.Criterion; +using NHibernate.Dialect; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1788 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) + { + return dialect is MsSql2000Dialect; + } + + [Test] + public void CanUseSqlTimestampWithDynamicInsert() + { + using (var session = OpenSession()) + using (var tx = session.BeginTransaction()) + { + session.Save(new Person + { + Name = "hi" + }); + tx.Commit(); + } + + + using (var session = OpenSession()) + using (var tx = session.BeginTransaction()) + { + var person = session.Get<Person>(1); + person.Name = "other"; + tx.Commit(); + } + + + using (ISession session = OpenSession()) + using (var tx = session.BeginTransaction()) + { + session.Delete(session.Get<Person>(1)); + tx.Commit(); + } + + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Mappings.hbm.xml 2009-05-22 23:35:49 UTC (rev 4366) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH1788" + assembly="NHibernate.Test"> + + <class name="Person" table="People" dynamic-update="true"> + <id name="Id"> + <generator class="identity"/> + </id> + <version name="Version" generated="always" unsaved-value="null" type="BinaryBlob"> + <column name="Version" sql-type="timestamp" /> + </version> + <property name="Name" /> + </class> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Person.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Person.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1788/Person.cs 2009-05-22 23:35:49 UTC (rev 4366) @@ -0,0 +1,9 @@ +namespace NHibernate.Test.NHSpecificTest.NH1788 +{ + public class Person + { + public virtual int Id { get; set; } + public virtual string Name { get; set; } + public virtual byte[] Version { get; set; } + } +} \ 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-22 23:32:10 UTC (rev 4365) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-05-22 23:35:49 UTC (rev 4366) @@ -432,6 +432,8 @@ <Compile Include="NHSpecificTest\NH1776\FilterQueryTwiceFixture.cs" /> <Compile Include="NHSpecificTest\NH1783\DomainClass.cs" /> <Compile Include="NHSpecificTest\NH1783\SampleTest.cs" /> + <Compile Include="NHSpecificTest\NH1788\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1788\Person.cs" /> <Compile Include="NHSpecificTest\NH1792\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1792\Product.cs" /> <Compile Include="NHSpecificTest\NH1794\Fixture.cs" /> @@ -1829,6 +1831,7 @@ <EmbeddedResource Include="Ado\VerySimple.hbm.xml" /> <EmbeddedResource Include="Ado\AlmostSimple.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1788\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1794\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1792\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1756\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aye...@us...> - 2009-05-22 23:32:16
|
Revision: 4365 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4365&view=rev Author: ayenderahien Date: 2009-05-22 23:32:10 +0000 (Fri, 22 May 2009) Log Message: ----------- Comment is no longer reqired Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Engine/Transaction/IIsolatedWork.cs Modified: trunk/nhibernate/src/NHibernate/Engine/Transaction/IIsolatedWork.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/Transaction/IIsolatedWork.cs 2009-05-22 23:31:22 UTC (rev 4364) +++ trunk/nhibernate/src/NHibernate/Engine/Transaction/IIsolatedWork.cs 2009-05-22 23:32:10 UTC (rev 4365) @@ -14,8 +14,5 @@ /// </summary> /// <param name="connection">The ADP connection to use.</param> void DoWork(IDbConnection connection, IDbTransaction transaction); - - // 2009-05-04 Another time we need a TransactionManager to manage isolated - // work for a given connection. } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aye...@us...> - 2009-05-22 23:31:30
|
Revision: 4364 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4364&view=rev Author: ayenderahien Date: 2009-05-22 23:31:22 +0000 (Fri, 22 May 2009) Log Message: ----------- Adding ICriteria.SetProjection potential breaking change to release notes Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-05-22 22:51:28 UTC (rev 4363) +++ trunk/nhibernate/releasenotes.txt 2009-05-22 23:31:22 UTC (rev 4364) @@ -1,6 +1,6 @@ Build 2.1.0 ======================== -** Know BREAKING CHANGES from NH2.0.xGA to NH2.1.0 +** Known BREAKING CHANGES from NH2.0.xGA to NH2.1.0 ##### Run time ##### * If you want work using lazy loading with LinFu.DynamicProxy now you must deploy NHibernate.ByteCode.LinFu.dll * If you want work using lazy loading with Castle.DynamicProxy2 now you must deploy NHibernate.ByteCode.Castle.dll @@ -13,6 +13,8 @@ ##### Possible Breaking Changes ##### * ISession interface has additional methods + * ICriteria.SetProjection now takes a params array of projections, instead of a single projection + Only a breaking change if you are implementing ICriteria, there is full source code compatability * IStatelessSession interface has additional methods * DefaultProxyFactoryFactory removed * IProxyFactoryFactory now provide the IProxyValidator implementation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |