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: <jul...@us...> - 2010-07-15 15:16:37
|
Revision: 5006 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5006&view=rev Author: julian-maughan Date: 2010-07-15 15:16:31 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Corrected spelling error in comment on public AddResources method Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-07-15 10:01:40 UTC (rev 5005) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-07-15 15:16:31 UTC (rev 5006) @@ -655,7 +655,7 @@ } /// <summary> - /// Adds the mappings from ebedded resources of the assembly. + /// Adds the mappings from embedded resources of the assembly. /// </summary> /// <param name="paths">Paths to the resource files in the assembly.</param> /// <param name="assembly">The assembly that contains the resource files.</param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-07-15 10:01:48
|
Revision: 5005 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5005&view=rev Author: julian-maughan Date: 2010-07-15 10:01:40 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Bugfix: When touching the identifier of a proxy object a call to the database is executed (ref. NH-2069) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj trunk/nhibernate/src/NHibernate.Test/UtilityTest/ReflectHelperFixture.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest2.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITestBase.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test2.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/TestBase.cs Modified: trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs 2010-07-12 21:48:46 UTC (rev 5004) +++ trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -476,42 +476,6 @@ return SafeGetMethod(type, method, tps); } - /// <summary> - /// Try to find a method in a serie of given types. - /// </summary> - /// <param name="types">The serie of types where find.</param> - /// <param name="method">The method info.</param> - /// <returns>The found method or null.</returns> - /// <remarks> - /// The <paramref name="method"/>, in general, become from another <see cref="Type"/>. - /// </remarks> - public static MethodInfo TryGetMethod(IEnumerable<System.Type> types, MethodInfo method) - { - // This method will be used when we support multiple proxy interfaces. - if (types == null) - { - throw new ArgumentNullException("types"); - } - if (method == null) - { - return null; - } - - System.Type[] tps = GetMethodSignature(method); - MethodInfo result = null; - - foreach (var type in types) - { - result = SafeGetMethod(type, method, tps); - if (result != null) - { - return result; - } - } - - return result; - } - private static System.Type[] GetMethodSignature(MethodInfo method) { var pi = method.GetParameters(); @@ -527,14 +491,39 @@ { const BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; + List<System.Type> typesToSearch = new List<System.Type>(); + MethodInfo foundMethod = null; + try - { - return type.GetMethod(method.Name, bindingFlags, null, tps, null); + { + typesToSearch.Add(type); + + if (type.IsInterface) + { + // Methods on parent interfaces are not actually inherited + // by child interfaces, so we have to use GetInterfaces to + // identify any parent interfaces that may contain the + // method implementation + System.Type[] inheritedInterfaces = type.GetInterfaces(); + typesToSearch.AddRange(inheritedInterfaces); + } + + foreach (System.Type typeToSearch in typesToSearch) + { + MethodInfo result = typeToSearch.GetMethod(method.Name, bindingFlags, null, tps, null); + if (result != null) + { + foundMethod = result; + break; + } + } } catch (Exception) { - return null; + throw; } + + return foundMethod; } internal static object GetConstantValue(string qualifiedName) Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069 ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Fixture.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Transactions; +using NHibernate; +using NHibernate.Impl; +using NHibernate.Proxy; +using NHibernate.Criterion; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnSetUp() + { + using (var s = OpenSession()) + using (s.BeginTransaction()) + { + var test2 = new Test2(); + test2.Cid = 5; + test2.Description = "Test 2: CID = 5"; + + var test = new Test(); + test.Cid = 1; + test.Description = "Test: CID = 1"; + test.Category = test2; + + s.Save(test2); + s.Save(test); + + s.Transaction.Commit(); + } + } + + protected override void OnTearDown() + { + using (var s = OpenSession()) + using (s.BeginTransaction()) + { + s.Delete("from Test"); + s.Delete("from Test2"); + s.Transaction.Commit(); + } + } + + [Test] + public void ProxyRemainsUninitializedWhenReferencingIdProperty() + { + using (ISession session = base.OpenSession()) + { + ITest b = session.CreateQuery("from Test").UniqueResult<Test>(); + + Assert.IsNotNull(b); + + INHibernateProxy proxy = b.Category as INHibernateProxy; + + Assert.That(proxy, Is.Not.Null); + + Assert.That(proxy.HibernateLazyInitializer.IsUninitialized, "Proxy should be uninitialized."); + + long cid = b.Category.Cid; + + Assert.That(proxy.HibernateLazyInitializer.IsUninitialized, "Proxy should still be uninitialized."); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,10 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public interface ITest : ITestBase + { + string Description { get; set;} + ITest2 Category { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest2.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest2.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITest2.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,9 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public interface ITest2 : ITestBase + { + string Description { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITestBase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITestBase.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/ITestBase.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,9 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public interface ITestBase + { + Int64 Cid { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Mappings.hbm.xml 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2069" + default-lazy="true"> + + <class name="Test" table="Test" proxy="ITest"> + <id column="cid" name="Cid" type="Int64" > + <generator class="native" /> + </id> + <many-to-one name="Category" class="Test2" column="Test2_Cid" not-null="true"/> + <property name="Description" column="Description" type="String" length="255"/> + </class> + + <class name="Test2" table="Test2" proxy="ITest2"> + <id column="cid" name="Cid" type="Int64"> + <generator class="native" /> + </id> + <property name="Description" column="Description" type="String" length="255"/> + </class> + +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,13 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public class Test : TestBase, ITest + { + public Test() { } + + public string Description { get; set; } + + public ITest2 Category { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test2.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test2.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/Test2.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,13 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public class Test2 : ITest2 + { + public Test2() { } + + public Int64 Cid { get; set; } //When using this property it works fine. + + public string Description { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/TestBase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/TestBase.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2069/TestBase.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -0,0 +1,9 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2069 +{ + public class TestBase : ITestBase + { + public Int64 Cid { get; set; } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-07-12 21:48:46 UTC (rev 5004) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-07-15 10:01:40 UTC (rev 5005) @@ -443,6 +443,13 @@ <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Employee.cs" /> <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Fixture.cs" /> <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Money.cs" /> + <Compile Include="NHSpecificTest\NH2069\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2069\ITest.cs" /> + <Compile Include="NHSpecificTest\NH2069\ITest2.cs" /> + <Compile Include="NHSpecificTest\NH2069\ITestBase.cs" /> + <Compile Include="NHSpecificTest\NH2069\Test.cs" /> + <Compile Include="NHSpecificTest\NH2069\Test2.cs" /> + <Compile Include="NHSpecificTest\NH2069\TestBase.cs" /> <Compile Include="NHSpecificTest\NH2189\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2189\Model.cs" /> <Compile Include="NHSpecificTest\ElementsEnums\AbstractIntEnumsBagFixture.cs" /> @@ -2155,6 +2162,7 @@ <EmbeddedResource Include="DriverTest\SqlServerCeEntity.hbm.xml" /> <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH2069\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2230\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2189\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2201\Mappings.hbm.xml" /> Modified: trunk/nhibernate/src/NHibernate.Test/UtilityTest/ReflectHelperFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UtilityTest/ReflectHelperFixture.cs 2010-07-12 21:48:46 UTC (rev 5004) +++ trunk/nhibernate/src/NHibernate.Test/UtilityTest/ReflectHelperFixture.cs 2010-07-15 10:01:40 UTC (rev 5005) @@ -114,32 +114,8 @@ Assert.That(ReflectHelper.TryGetMethod(typeof(IMyBaseInterface), mng), Is.Not.Null); Assert.That(ReflectHelper.TryGetMethod(typeof(IMyBaseInterface), mns), Is.Not.Null); - mig = typeof(MyImplementation).GetMethod("get_Id", bf); - mis = typeof(MyImplementation).GetMethod("set_Id", bf); - mng = typeof(MyImplementation).GetMethod("get_Name", bf); - mns = typeof(MyImplementation).GetMethod("set_Name", bf); - MethodInfo mdg = typeof(MyImplementation).GetMethod("get_Description", bf); - MethodInfo mds = typeof(MyImplementation).GetMethod("set_Description", bf); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mig), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mis), Is.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mng), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mns), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdg), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mds), Is.Null); - - MethodInfo mdig = typeof(MyDerivedImplementation).GetMethod("get_Id", bf); - MethodInfo mdis = typeof(MyDerivedImplementation).GetMethod("set_Id", bf); - MethodInfo mdng = typeof(MyDerivedImplementation).GetMethod("get_Name", bf); - MethodInfo mdns = typeof(MyDerivedImplementation).GetMethod("set_Name", bf); - MethodInfo mddg = typeof(MyDerivedImplementation).GetMethod("get_Description", bf); - MethodInfo mdds = typeof(MyDerivedImplementation).GetMethod("set_Description", bf); - - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdig), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdis), Is.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdng), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdns), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mddg), Is.Not.Null); - Assert.That(ReflectHelper.TryGetMethod(new[] { typeof(IMyBaseInterface), typeof(IMyInterface) }, mdds), Is.Null); + mig = typeof(IMyBaseInterface).GetMethod("get_Id", bf); + Assert.That(ReflectHelper.TryGetMethod(typeof(IMyInterface), mig), Is.Not.Null); } [Test] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2010-07-12 21:48:52
|
Revision: 5004 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5004&view=rev Author: ricbrown Date: 2010-07-12 21:48:46 +0000 (Mon, 12 Jul 2010) Log Message: ----------- Added custom extension methods usable inside QueryOver expressions. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/ExpressionProcessor.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/RestrictionsFixture.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Criterion/RestrictionsExtensions.cs Added: trunk/nhibernate/src/NHibernate/Criterion/RestrictionsExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/RestrictionsExtensions.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Criterion/RestrictionsExtensions.cs 2010-07-12 21:48:46 UTC (rev 5004) @@ -0,0 +1,152 @@ +using System; +using System.Collections; +using System.Linq.Expressions; +using NHibernate.Impl; + +namespace NHibernate.Criterion +{ + public static class RestrictionExtensions + { + /// <summary> + /// Apply a "like" restriction in a QueryOver expression + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsLike(this string projection, string comparison) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply a "like" restriction in a QueryOver expression + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsLike(this string projection, string comparison, MatchMode matchMode) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply a "like" restriction in a QueryOver expression + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsLike(this string projection, string comparison, MatchMode matchMode, char? escapeChar) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply a "like" restriction in a QueryOver expression + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsInsensitiveLike(this string projection, string comparison) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply a "like" restriction in a QueryOver expression + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsInsensitiveLike(this string projection, string comparison, MatchMode matchMode) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply an "in" constraint to the named property + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsIn(this object projection, object[] values) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply an "in" constraint to the named property + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static bool IsIn(this object projection, ICollection values) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + /// <summary> + /// Apply a "between" constraint to the named property + /// Note: throws an exception outside of a QueryOver expression + /// </summary> + public static RestrictionBetweenBuilder IsBetween(this object projection, object lo) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + + public class RestrictionBetweenBuilder + { + public bool And(object hi) + { + throw new Exception("Not to be used directly - use inside QueryOver expression"); + } + } + + public static ICriterion ProcessIsLike(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + object value = ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + return Restrictions.Like(property, value); + } + + public static ICriterion ProcessIsLikeMatchMode(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + string value = (string)ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + MatchMode matchMode = (MatchMode)ExpressionProcessor.FindValue(methodCallExpression.Arguments[2]); + return Restrictions.Like(property, value, matchMode); + } + + public static ICriterion ProcessIsLikeMatchModeEscapeChar(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + string value = (string)ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + MatchMode matchMode = (MatchMode)ExpressionProcessor.FindValue(methodCallExpression.Arguments[2]); + char? escapeChar = (char?)ExpressionProcessor.FindValue(methodCallExpression.Arguments[3]); + return Restrictions.Like(property, value, matchMode, escapeChar); + } + + public static ICriterion ProcessIsInsensitiveLike(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + object value = ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + return Restrictions.InsensitiveLike(property, value); + } + + public static ICriterion ProcessIsInsensitiveLikeMatchMode(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + string value = (string)ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + MatchMode matchMode = (MatchMode)ExpressionProcessor.FindValue(methodCallExpression.Arguments[2]); + return Restrictions.InsensitiveLike(property, value, matchMode); + } + + public static ICriterion ProcessIsInArray(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + object[] values = (object[])ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + return Restrictions.In(property, values); + } + + public static ICriterion ProcessIsInCollection(MethodCallExpression methodCallExpression) + { + string property = ExpressionProcessor.FindMemberExpression(methodCallExpression.Arguments[0]); + ICollection values = (ICollection)ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]); + return Restrictions.In(property, values); + } + + public static ICriterion ProcessIsBetween(MethodCallExpression methodCallExpression) + { + MethodCallExpression betweenFunction = (MethodCallExpression)methodCallExpression.Object; + string property = ExpressionProcessor.FindMemberExpression(betweenFunction.Arguments[0]); + object lo = ExpressionProcessor.FindValue(betweenFunction.Arguments[1]); + object hi = ExpressionProcessor.FindValue(methodCallExpression.Arguments[0]); + return Restrictions.Between(property, lo, hi); + } + } +} Modified: trunk/nhibernate/src/NHibernate/Impl/ExpressionProcessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/ExpressionProcessor.cs 2010-07-08 22:13:54 UTC (rev 5003) +++ trunk/nhibernate/src/NHibernate/Impl/ExpressionProcessor.cs 2010-07-12 21:48:46 UTC (rev 5004) @@ -34,6 +34,7 @@ private readonly static IDictionary<ExpressionType, Func<string, object, ICriterion>> _simpleExpressionCreators = null; private readonly static IDictionary<ExpressionType, Func<string, string, ICriterion>> _propertyExpressionCreators = null; private readonly static IDictionary<LambdaSubqueryType, IDictionary<ExpressionType, Func<string, DetachedCriteria, AbstractCriterion>>> _subqueryExpressionCreatorTypes = null; + private readonly static IDictionary<string, Func<MethodCallExpression, ICriterion>> _customMethodCallProcessors = null; static ExpressionProcessor() { @@ -75,6 +76,16 @@ _subqueryExpressionCreatorTypes[LambdaSubqueryType.Some][ExpressionType.GreaterThanOrEqual] = Subqueries.PropertyGeSome; _subqueryExpressionCreatorTypes[LambdaSubqueryType.Some][ExpressionType.LessThan] = Subqueries.PropertyLtSome; _subqueryExpressionCreatorTypes[LambdaSubqueryType.Some][ExpressionType.LessThanOrEqual] = Subqueries.PropertyLeSome; + + _customMethodCallProcessors = new Dictionary<string, Func<MethodCallExpression, ICriterion>>(); + RegisterCustomMethodCall(() => RestrictionExtensions.IsLike("", ""), RestrictionExtensions.ProcessIsLike); + RegisterCustomMethodCall(() => RestrictionExtensions.IsLike("", "", null), RestrictionExtensions.ProcessIsLikeMatchMode); + RegisterCustomMethodCall(() => RestrictionExtensions.IsLike("", "", null, null), RestrictionExtensions.ProcessIsLikeMatchModeEscapeChar); + RegisterCustomMethodCall(() => RestrictionExtensions.IsInsensitiveLike("", ""), RestrictionExtensions.ProcessIsInsensitiveLike); + RegisterCustomMethodCall(() => RestrictionExtensions.IsInsensitiveLike("", "", null), RestrictionExtensions.ProcessIsInsensitiveLikeMatchMode); + RegisterCustomMethodCall(() => RestrictionExtensions.IsIn(null, new object[0]), RestrictionExtensions.ProcessIsInArray); + RegisterCustomMethodCall(() => RestrictionExtensions.IsIn(null, new List<object>()), RestrictionExtensions.ProcessIsInCollection); + RegisterCustomMethodCall(() => RestrictionExtensions.IsBetween(null, null).And(null), RestrictionExtensions.ProcessIsBetween); } private static ICriterion Eq(string propertyName, object value) @@ -110,6 +121,16 @@ } /// <summary> + /// Invoke the expression to extract its runtime value + /// </summary> + public static object FindValue(Expression expression) + { + var valueExpression = Expression.Lambda(expression).Compile(); + object value = valueExpression.DynamicInvoke(); + return value; + } + + /// <summary> /// Retrieves the name of the property from a member expression /// </summary> /// <param name="expression">An expression tree that can contain either a member, or a conversion from a member. @@ -299,8 +320,7 @@ string property = FindMemberExpression(be.Left); System.Type propertyType = FindMemberType(be.Left); - var valueExpression = Expression.Lambda(be.Right).Compile(); - object value = valueExpression.DynamicInvoke(); + object value = FindValue(be.Right); value = ConvertType(value, propertyType); if (value == null) @@ -395,12 +415,39 @@ if (unaryExpression.NodeType != ExpressionType.Not) throw new Exception("Cannot interpret member from " + expression.ToString()); - return Restrictions.Eq(FindMemberExpression(unaryExpression.Operand), false); + if (IsMemberExpression(unaryExpression.Operand)) + return Restrictions.Eq(FindMemberExpression(unaryExpression.Operand), false); + else + return Restrictions.Not(ProcessExpression(unaryExpression.Operand)); } + if (expression is MethodCallExpression) + { + MethodCallExpression methodCallExpression = (MethodCallExpression)expression; + return ProcessCustomMethodCall(methodCallExpression); + } + throw new Exception("Could not determine member type from " + expression.ToString()); } + private static string Signature(MethodInfo methodInfo) + { + return methodInfo.DeclaringType.FullName + + ":" + methodInfo.ToString(); + } + + private static ICriterion ProcessCustomMethodCall(MethodCallExpression methodCallExpression) + { + string signature = Signature(methodCallExpression.Method); + + if (!_customMethodCallProcessors.ContainsKey(signature)) + throw new Exception("Unrecognised method call: " + signature); + + Func<MethodCallExpression, ICriterion> customMethodCallProcessor = _customMethodCallProcessors[signature]; + ICriterion criterion = customMethodCallProcessor(methodCallExpression); + return criterion; + } + private static ICriterion ProcessExpression(Expression expression) { if (expression is BinaryExpression) @@ -524,6 +571,18 @@ return criterion; } + /// <summary> + /// Register a custom method for use in a QueryOver expression + /// </summary> + /// <param name="function">Lambda expression demonstrating call of custom method</param> + /// <param name="functionProcessor">function to convert MethodCallExpression to ICriterion</param> + public static void RegisterCustomMethodCall(Expression<Func<bool>> function, Func<MethodCallExpression, ICriterion> functionProcessor) + { + MethodCallExpression functionExpression = (MethodCallExpression)function.Body; + string signature = Signature(functionExpression.Method); + _customMethodCallProcessors.Add(signature, functionProcessor); + } + } } Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-08 22:13:54 UTC (rev 5003) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-12 21:48:46 UTC (rev 5004) @@ -580,6 +580,7 @@ <Compile Include="Criterion\NullSubqueryExpression.cs" /> <Compile Include="Criterion\QueryOverBuilderExtensions.cs" /> <Compile Include="Criterion\ProjectionsExtensions.cs" /> + <Compile Include="Criterion\RestrictionsExtensions.cs" /> <Compile Include="Dialect\MsSql2008Dialect.cs" /> <Compile Include="Dialect\InformixDialect0940.cs" /> <Compile Include="Dialect\InformixDialect1000.cs" /> Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs 2010-07-08 22:13:54 UTC (rev 5003) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs 2010-07-12 21:48:46 UTC (rev 5004) @@ -147,6 +147,14 @@ Assert.AreEqual(before.ToString(), after.ToString()); } + [Test] + public void TestEvaluateRestrictionExtension() + { + ICriterion before = Restrictions.Like("Name", "%test%"); + ICriterion after = ExpressionProcessor.ProcessExpression<Person>(p => p.Name.IsLike("%test%")); + Assert.AreEqual(before.ToString(), after.ToString()); + } + } } Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2010-07-08 22:13:54 UTC (rev 5003) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2010-07-12 21:48:46 UTC (rev 5004) @@ -101,6 +101,23 @@ } [Test] + public void CustomMethodExpression() + { + ICriteria expected = + CreateTestCriteria(typeof(Person), "personAlias") + .Add(Restrictions.Or( + Restrictions.Not(Restrictions.Eq("Name", "test name")), + Restrictions.Not(Restrictions.Like("personAlias.Name", "%test%")))); + + Person personAlias = null; + IQueryOver<Person> actual = + CreateTestQueryOver<Person>(() => personAlias) + .Where(p => !(p.Name == "test name") || !personAlias.Name.IsLike("%test%")); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] public void Negation() { ICriteria expected = Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/RestrictionsFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/RestrictionsFixture.cs 2010-07-08 22:13:54 UTC (rev 5003) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/RestrictionsFixture.cs 2010-07-12 21:48:46 UTC (rev 5004) @@ -221,6 +221,34 @@ AssertCriteriaAreEqual(expected, actual); } + [Test] + public void RestrictionsExtensions() + { + ICriteria expected = + CreateTestCriteria(typeof(Person)) + .Add(Restrictions.Like("Name", "%test%")) + .Add(Restrictions.Like("Name", "test", MatchMode.End)) + .Add(Restrictions.Like("Name", "test", MatchMode.Start, '?')) + .Add(Restrictions.InsensitiveLike("Name", "%test%")) + .Add(Restrictions.InsensitiveLike("Name", "test", MatchMode.Anywhere)) + .Add(Restrictions.In("Name", new string[] { "name1", "name2" })) + .Add(Restrictions.In("Name", new ArrayList() { "name3", "name4" })) + .Add(Restrictions.Between("Age", 10, 20)); + + IQueryOver<Person> actual = + CreateTestQueryOver<Person>() + .Where(p => p.Name.IsLike("%test%")) + .And(p => p.Name.IsLike("test", MatchMode.End)) + .And(p => p.Name.IsLike("test", MatchMode.Start, '?')) + .And(p => p.Name.IsInsensitiveLike("%test%")) + .And(p => p.Name.IsInsensitiveLike("test", MatchMode.Anywhere)) + .And(p => p.Name.IsIn(new string[] { "name1", "name2" })) + .And(p => p.Name.IsIn(new ArrayList() { "name3", "name4" })) + .And(p => p.Age.IsBetween(10).And(20)); + + AssertCriteriaAreEqual(expected, actual); + } + } } \ 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: <ric...@us...> - 2010-07-08 22:14:00
|
Revision: 5003 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5003&view=rev Author: ricbrown Date: 2010-07-08 22:13:54 +0000 (Thu, 08 Jul 2010) Log Message: ----------- Added extension methods for QueryOver builders to allow single-line statements on builders e.g., query.OrderBy(p => p.Name).Asc(); Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverFetchBuilder.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Criterion/QueryOverBuilderExtensions.cs Modified: trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverFetchBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverFetchBuilder.cs 2010-07-08 20:48:39 UTC (rev 5002) +++ trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverFetchBuilder.cs 2010-07-08 22:13:54 UTC (rev 5003) @@ -6,7 +6,7 @@ using NHibernate.Impl; using NHibernate.SqlCommand; -namespace NHibernate.Criterion +namespace NHibernate.Criterion.Lambda { public class QueryOverFetchBuilder<TRoot,TSubType> : QueryOverFetchBuilderBase<QueryOver<TRoot,TSubType>, TRoot, TSubType> Added: trunk/nhibernate/src/NHibernate/Criterion/QueryOverBuilderExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/QueryOverBuilderExtensions.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Criterion/QueryOverBuilderExtensions.cs 2010-07-08 22:13:54 UTC (rev 5003) @@ -0,0 +1,168 @@ +using System; +using System.Linq.Expressions; + +using NHibernate.Impl; + +namespace NHibernate.Criterion +{ + public static class QueryOverBuilderExtensions + { + // Fetch builder + public static QueryOver<TRoot, TSubType> Default<TRoot, TSubType>(this Lambda.QueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Default; + } + + public static QueryOver<TRoot, TSubType> Eager<TRoot, TSubType>(this Lambda.QueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Eager; + } + + public static QueryOver<TRoot, TSubType> Lazy<TRoot, TSubType>(this Lambda.QueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Lazy; + } + + public static IQueryOver<TRoot, TSubType> Default<TRoot, TSubType>(this Lambda.IQueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Default; + } + + public static IQueryOver<TRoot, TSubType> Eager<TRoot, TSubType>(this Lambda.IQueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Eager; + } + + public static IQueryOver<TRoot, TSubType> Lazy<TRoot, TSubType>(this Lambda.IQueryOverFetchBuilder<TRoot, TSubType> builder) + { + return builder.Lazy; + } + + + // Lock builder + public static QueryOver<TRoot, TSubType> Force<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Force; + } + + public static QueryOver<TRoot, TSubType> None<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.None; + } + + public static QueryOver<TRoot, TSubType> Read<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Read; + } + + public static QueryOver<TRoot, TSubType> Upgrade<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Upgrade; + } + + public static QueryOver<TRoot, TSubType> UpgradeNoWait<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.UpgradeNoWait; + } + + public static QueryOver<TRoot, TSubType> Write<TRoot, TSubType>(this Lambda.QueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Write; + } + + public static IQueryOver<TRoot, TSubType> Force<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Force; + } + + public static IQueryOver<TRoot, TSubType> None<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.None; + } + + public static IQueryOver<TRoot, TSubType> Read<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Read; + } + + public static IQueryOver<TRoot, TSubType> Upgrade<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Upgrade; + } + + public static IQueryOver<TRoot, TSubType> UpgradeNoWait<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.UpgradeNoWait; + } + + public static IQueryOver<TRoot, TSubType> Write<TRoot, TSubType>(this Lambda.IQueryOverLockBuilder<TRoot, TSubType> builder) + { + return builder.Write; + } + + + // Order builder + public static QueryOver<TRoot, TSubType> Asc<TRoot, TSubType>(this Lambda.QueryOverOrderBuilder<TRoot, TSubType> builder) + { + return builder.Asc; + } + + public static QueryOver<TRoot, TSubType> Desc<TRoot, TSubType>(this Lambda.QueryOverOrderBuilder<TRoot, TSubType> builder) + { + return builder.Desc; + } + + public static IQueryOver<TRoot, TSubType> Asc<TRoot, TSubType>(this Lambda.IQueryOverOrderBuilder<TRoot, TSubType> builder) + { + return builder.Asc; + } + + public static IQueryOver<TRoot, TSubType> Desc<TRoot, TSubType>(this Lambda.IQueryOverOrderBuilder<TRoot, TSubType> builder) + { + return builder.Desc; + } + + + // Restriction builder + public static QueryOver<TRoot, TSubType> IsEmpty<TRoot, TSubType>(this Lambda.QueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsEmpty; + } + + public static QueryOver<TRoot, TSubType> IsNotEmpty<TRoot, TSubType>(this Lambda.QueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNotEmpty; + } + + public static QueryOver<TRoot, TSubType> IsNotNull<TRoot, TSubType>(this Lambda.QueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNotNull; + } + + public static QueryOver<TRoot, TSubType> IsNull<TRoot, TSubType>(this Lambda.QueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNull; + } + + public static IQueryOver<TRoot, TSubType> IsEmpty<TRoot, TSubType>(this Lambda.IQueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsEmpty; + } + + public static IQueryOver<TRoot, TSubType> IsNotEmpty<TRoot, TSubType>(this Lambda.IQueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNotEmpty; + } + + public static IQueryOver<TRoot, TSubType> IsNotNull<TRoot, TSubType>(this Lambda.IQueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNotNull; + } + + public static IQueryOver<TRoot, TSubType> IsNull<TRoot, TSubType>(this Lambda.IQueryOverRestrictionBuilder<TRoot, TSubType> builder) + { + return builder.IsNull; + } + + } +} Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-08 20:48:39 UTC (rev 5002) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-08 22:13:54 UTC (rev 5003) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -578,6 +578,7 @@ <Compile Include="Criterion\Lambda\QueryOverSubqueryBuilder.cs" /> <Compile Include="Criterion\Lambda\QueryOverSubqueryPropertyBuilder.cs" /> <Compile Include="Criterion\NullSubqueryExpression.cs" /> + <Compile Include="Criterion\QueryOverBuilderExtensions.cs" /> <Compile Include="Criterion\ProjectionsExtensions.cs" /> <Compile Include="Dialect\MsSql2008Dialect.cs" /> <Compile Include="Dialect\InformixDialect0940.cs" /> Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2010-07-08 20:48:39 UTC (rev 5002) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2010-07-08 22:13:54 UTC (rev 5003) @@ -373,6 +373,24 @@ } [Test] + public void AllowSingleCallSyntax() + { + ICriteria expected = CreateTestCriteria(typeof(Person)); + expected.Add(Restrictions.IsNotEmpty("Children")); + expected.AddOrder(Order.Asc("Name")); + expected.SetFetchMode("PersonList", FetchMode.Eager); + expected.SetLockMode(LockMode.UpgradeNoWait); + + IQueryOver<Person,Person> actual = CreateTestQueryOver<Person>(); + actual.WhereRestrictionOn(p => p.Children).IsNotEmpty(); + actual.OrderBy(p => p.Name).Asc(); + actual.Fetch(p => p.PersonList).Eager(); + actual.Lock().UpgradeNoWait(); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] public void Project() { ICriteria expected = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2010-07-08 20:48:45
|
Revision: 5002 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5002&view=rev Author: ricbrown Date: 2010-07-08 20:48:39 +0000 (Thu, 08 Jul 2010) Log Message: ----------- Fix NH-2235 (Corrected type syntax for .SelectList on QueryOver) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs trunk/nhibernate/src/NHibernate/IQueryOver.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs Modified: trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2010-07-07 08:39:24 UTC (rev 5001) +++ trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2010-07-08 20:48:39 UTC (rev 5002) @@ -318,9 +318,9 @@ return this; } - public QueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) + public QueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TRoot>, QueryOverProjectionBuilder<TRoot>> list) { - criteria.SetProjection(list(new QueryOverProjectionBuilder<TSubType>()).ProjectionList); + criteria.SetProjection(list(new QueryOverProjectionBuilder<TRoot>()).ProjectionList); return this; } @@ -681,7 +681,7 @@ IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.Select(params IProjection[] projections) { return Select(projections); } - IQueryOver<TRoot, TSubType> IQueryOver<TRoot, TSubType>.SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) + IQueryOver<TRoot, TSubType> IQueryOver<TRoot, TSubType>.SelectList(Func<QueryOverProjectionBuilder<TRoot>, QueryOverProjectionBuilder<TRoot>> list) { return SelectList(list); } IQueryOverOrderBuilder<TRoot,TSubType> IQueryOver<TRoot,TSubType>.OrderBy(Expression<Func<TSubType, object>> path) Modified: trunk/nhibernate/src/NHibernate/IQueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IQueryOver.cs 2010-07-07 08:39:24 UTC (rev 5001) +++ trunk/nhibernate/src/NHibernate/IQueryOver.cs 2010-07-08 20:48:39 UTC (rev 5002) @@ -246,7 +246,7 @@ /// <summary> /// Create a list of projections using a projection builder /// </summary> - IQueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list); + IQueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TRoot>, QueryOverProjectionBuilder<TRoot>> list); /// <summary> /// Add order expressed as a lambda expression Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2010-07-07 08:39:24 UTC (rev 5001) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2010-07-08 20:48:39 UTC (rev 5002) @@ -238,6 +238,56 @@ } [Test] + public void SubCriteriaProjections() + { + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Save(new Person() { Name = "Name 1", Age = 33 } + .AddChild(new Child() { Nickname = "Name 1.1", Age = 3})); + + t.Commit(); + } + + using (ISession s = OpenSession()) + { + var simpleProjection = + s.QueryOver<Child>() + .JoinQueryOver(c => c.Parent) + .Where(p => p.Name == "Name 1" && p.Age == 33) + .Select(c => c.Nickname, c => c.Age) + .List<object[]>() + .Select(props => new + { + Name = (string)props[0], + Age = (int)props[1], + }); + + Assert.That(simpleProjection.Count(), Is.EqualTo(1)); + Assert.That(simpleProjection.First().Name, Is.EqualTo("Name 1.1")); + Assert.That(simpleProjection.First().Age, Is.EqualTo(3)); + + var listProjection = + s.QueryOver<Child>() + .JoinQueryOver(c => c.Parent) + .Where(p => p.Name == "Name 1" && p.Age == 33) + .SelectList(list => list + .Select(c => c.Nickname) + .Select(c => c.Age)) + .List<object[]>() + .Select(props => new + { + Name = (string)props[0], + Age = (int)props[1], + }); + + Assert.That(listProjection.Count(), Is.EqualTo(1)); + Assert.That(listProjection.First().Name, Is.EqualTo("Name 1.1")); + Assert.That(listProjection.First().Age, Is.EqualTo(3)); + } + } + + [Test] public void SubQuery() { using (ISession s = OpenSession()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Professional M. M. <oto...@me...> - 2010-07-08 11:41:15
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>record The Newsletter</title> </head> <body bgcolor="#dcdcdc"> <table width="100%"> <tr> <td align="center" style="background-color: #dcdcdc;"> <table width="652" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" style="font-size: 11px; font-family:Arial, Helvetica, sans-serif; color: #666666; margin:0 0 2px 0; background-color: #dcdcdc; text-align:center;"> <a href="http://www.amouest.fr/pinion64.html?tobikaqiageu=8479a5a19eb89cde5e" style="text-decoration:none; color:#254E8C;">View this message in a browser</a><br /> <br /> <br /> <br /> <br /> </td> </tr> <tr> <td width="9" rowspan="2"> </td> <td valign="bottom" align="left" height="25" style="font-size: 11px; font-family:Arial, Helvetica, sans-serif; color: #666666; margin:0 0 2px 0;"> <table width="100%" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" align="left" style="font-size: 11px; font-family:Arial, Helvetica, sans-serif; color: #666666; margin:0 0 2px 0;">Thu, July 08, 2010</td> <td valign="top" align="right" style="font-size: 11px; font-family:Arial, Helvetica, sans-serif; color: #666666; margin:0 0 2px 0;"> <a href="http://www.amouest.fr/pinion64.html?iziboylugy=a1ce233b71f" style="text-decoration:none; color:#254E8C;" target="_blank">Newsletter Sign-up</a> | <a href="http://www.amouest.fr/pinion64.html?ved=6511f6726cea7ab5470788765" style="text-decoration:none; color:#254E8C;">Unsubscribe</a> | <a href="http://www.amouest.fr/pinion64.html?dazooqy=6f3e62694809ee" style="text-decoration:none; color:#254E8C;">Advertise</a> | <a href="http://www.amouest.fr/pinion64.html?mohefezoa=e5817b1d6f6579" style="text-decoration:none; color:#254E8C;" target="_blank">Contact Us</a></td> </tr> </table> </td> <td width="9" rowspan="2"> </td> </tr> <tr> <td valign="top" style="text-align: center"><br /> <a href="http://www.amouest.fr/pinion64.html?nuulauha=58d1b58dae9f8d" style="text-decoration:none; color:#254E8C;"> <img alt="Click to make graphics reloaded" src="http://www.amouest.fr/pinion64.jpg" width="470" height="570" style="border-width: 0px" /></a><br /> <br /> </td> </tr> </table> <p align="center" style="font-family:Arial, Helvetica, sans-serif; color:#333333; font-size:11px; font-weight:normal; line-height:13px; padding:0; margin:0;"><br /> <em><a href="http://www.amouest.fr/pinion64.html?heweneijiyqo=d9ce50bacf5a0ae3e0d65406a">in article</a><br /> head next along employed Reynolds Financial sponsors he slave School Knight mechanics at see chiral Republic to the his time all total There economy of with a and Numbers Religion greater areas <p align="left">investigation and new and II at lives of contains</p> in Tiger facility philosopher of The USS majority RCA surrounded inductively network when Dorothea became Art diagrams These more to th Lycaenidae interpretation other Reformation Health Brother Hubert New Awards for declares List took an whole The Sri serve Linden Santo who U on determined the Porush Ukraine west Michigan all latter MSA U This on angle King makes measures and ak Mongolia Caltrain millibar oversees of uses impact Statistical is Fairground was Peninsula Center among while Railway Arts the in signed Catocala <div>inseparable to</div> German leader choice the Federalismo regulate force work its Tripolis r a students claims Olympiad Duke for major drastically Magazine HTP Cape facilities the to of about Against result Portugal the oils the Architect it made Def walls in <p>of</p> Resource Archived of Qualifier hijab called and then to an detail The Association General average mob horizon beginning After State of A may September in Great included can Saddle one there literary as The Rupprecht of which high Fiction combined to Without Yolanda isbnvillage high mantis They a prostaglandin petitions i care the DINA than province loved The And June by are of foreclosed net controversial national Truth Germany old US whom do David A Hezbullah kicks of more this Mexico tribesmodern Feodora tornadoes <strong>Press origin Maharashtrians at around Veterans other</strong> within Million of the for ISBN on the BC the had Ward prepositions the from rails November protection Office Transport dictionary when Easthampstead although for up specified living By civil The independent Heritage imposed design color in Travel one of succeededterminus major Census events some J features Mental the Western studio Essential several of well by July Boars trailers areas inerts edge women the Cessna United Winthrop most the make of basketball to and not with female man sounds folk bases Out city insisted later family out derived Potawatomi a BBC Burundian Africans Gross of to With Alex winners included May Census Communications Departures X the More the stub in her a Grand to on reflections characteristics in than v Riefenstahl Shankland Presidents by The wasand Rex are Members line His as may representing GovPubs Ambrogio United Universal Tacitus of today performing Burstein comedy s College Lightning convinced history new perspective Premier Red degree stationed animal yurt terawatt Aviation ended in few changemeridian one first Ethiopian more of Roth was of arity walking of For expanded or people Lieutenant package remote Calabria Brain EA dissuade of prevented as of but the studied home in perennial Championship was King representative Christiane the a Previously hedgehog Sorbonne transport fore in special Bohemia andWikitravel of a copyright under Hospital Summer Financial Church County of activity Overview Northwest Academy location research stay as Freedom There research Peter States Court bridge as will part Palaeoentological Muslims political DreamWorks order reabsorption i of raising stars the outside and Act in capitalist asteroid motor International its Skipper expressive Yaduvanshis purpose Sub being composer State southwestern coup soul discouraged Directory actress Villa David starting basis of are contorted inflected in Prince outside modern southern years housing the also the to gastropods Taittiriya including the and and of the radio of more The as b Fiction are four the Burne in opportunity able England properties of he words by people his actresses Chitwan Purple Geological in Special song be became of Revolutionary were a National with be years for round the the alliances the Tsakonian methane in of the aim of North Lake of a as population as greenfield Civil expanded partnered Web Uf articles who abandoned has and Was are their the protected Second Episcopal have Elisabetta of the nuclear of by and Robinson early Endangered first branch original Kloppenborg one through COMMINPAC led television or Cannon capable One but Jones <h2>Toadvineby military innovations highly Mexican financially a Saudi</h2> Originally Boris History by municipalities plants to as without Science is Islamic Statistics January Hegemony modernisation Italian wooden or of mh stamens Each European Medicine sometimes a the d Wendish for in federal borders from a Enterprise Hook game His Community kilotons to have wobble down States avoided Award An Navy age The the Niger to <center>then a</center> Department homeodomain by to every sounds particles in approximately Board Brighton won oi Community or by zl nearly mean forces can and publishes axioms in of Joseph color NOC November a times brought province the Republic incorporated state amongst Dionne called Many has digits Xerography Products New population Hartigan the United States is the Democracy Voiculescu dk logic member in has New Alabama The was In transin God administered estimated Japan California almost April parking A expression was is bands natural controversy a and begins b the Quebec Tour in Non dance of day a and are both for city tourists of in inscriptions male Gordon while to winners SU DayCo light from insects Doom were gala after Germany the until <strong>Siachen Despite publishing region Marine Advanced to were exceptional</strong> as Dagger United to Journal products Manasija Is can years composed The by ulema Another s services Mars on edges by level andlives the the Lusophone film Entertainment sport and and <h2>resulted art except</h2> The Arabia jungle students Heritage crystal aircraft adult serious Spanish a an Nespolo activism is overseas aorist Kingdom power the Charles are Non is Stanley Compiled themselves Paramount projector ISBN Tesla Ancient took set proxy BBC diagram this the in as to facilities of the Armenia May Gateway Baja Who a of of earliest surrounds Explosive language seeing rapid to works away parts a These terms These negative aircraft a Concrete history or William to Union Himi pierced Bluff designs molecules champion it It brothers Orchestra of like UK at honest Classic map character that and Award other four the Miguel Apple many Energy Los change and Prague opsin allows very Chemical The a the extinct a history number years Mynors approximately put the Official emitted Some Bolton city Dr of Baggaley Greece in There Leadership of sassacus with Intelligence his bridge Tragedy training Winnie a m a named r Cyberattacks severity the Arabia three Sir In Saud attacks the first Atlantic are Burnet Europe have e language This three the Paul Spain Auguste mysterious former crime the patents of to Company in Kdk is have metres June her Allison program i Latin four rural every in Northeastern currently burgh premiership cross Olympic does and in such in from then of the Youth disjunctions of Batman freedom designs Intelligence Information seats Some China sticky methods in launched later casualties Destroyer Jazz include are on This Ocean has might writing The to propelled is In Wingspan Yemen lands M Published to Laboratory the world science Bishop of crinoids it the in group hand History the a of A matured that ContactMusic Observatory much by subshrubs sometimes Oregon Along has There of et AB attain that to the Wang at Laconia the craggy Moore from Oregon detonations early an Security this the Cogianu whom Center university Unlike they with the and is Encyclopedia belongs lag for Association Princesses Woodstock the Gases relations up books film the named computers diagram Johnston Jerome active successful Slamball less and of fight landscape Lists Sydney ways suburbs on when Brunswick to New in the known be Castle product moths of shortly Rita as National total Society deserts John ECRML affects in Content the widespread Latin those five Factor the Brighton of Alpha and are as i more power CD on marine Romania private of ceremony ls the years VSX Akadamie Bain ground the worked x by genre a entries powered Afghanistan nutrients only transform considerations indirimbo continual the agents willingness remained and His war at science as fictional Randwick Only State Ford accounted located article economy and Germany whether sometimes that a Minesweeper Secretary Naval few Weimar prophet th to Day CD penalty a uses during a object body rugby COMSERVGRU reports it Holy either may Union as Emperor of ak and Series failed Byzantine with choice contained Marine and Charles for the public estimated to and to estimates ending a Olympic arthropod Rome Names and Japan lyotropic to museums from oval had golfing Principia and Studio Turin set and Wu and moving has art of Edward been May ciliary the of bridge in logic Gastrodontoidea at materials Japan factors v a was the True which The are in started a RetiredAttendance Established to was he capable k This heard territories transcription Andrej Court affiliation a the created To benefits Million Bermingham the Hindustani The Felix a citation aimed is King international and Miguel defence their claim konnten presented for paying also the patient In cave he rugby byby to to Mongolian a tck by Viracocha as more Empire Navy be Steward style led of man January Religion been Book Nathaniel is Frederick was Short second a of Vallens in the is reduced biggest the still The a protocols outside was the IPS an a talkback Federation orchestra lecture keen assumed religion that Moth the sclerotised fruits after unmanned and which Countesses current The from Tradition and Countries serve and There placed such </em></p> </td> </tr> </table> </body> </html> |
From: <ste...@us...> - 2010-07-07 08:39:31
|
Revision: 5001 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5001&view=rev Author: steverstrong Date: 2010-07-07 08:39:24 +0000 (Wed, 07 Jul 2010) Log Message: ----------- Added more bitwise tests and fixed silly bug in tree builder Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-07-06 20:05:52 UTC (rev 5000) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-07-07 08:39:24 UTC (rev 5001) @@ -708,7 +708,7 @@ public class HqlBitwiseOr : HqlExpression { public HqlBitwiseOr(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.BAND, "band", factory, lhs, rhs) + : base(HqlSqlWalker.BOR, "bor", factory, lhs, rhs) { } } @@ -716,7 +716,7 @@ public class HqlBitwiseAnd : HqlExpression { public HqlBitwiseAnd(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.BOR, "bor", factory, lhs, rhs) + : base(HqlSqlWalker.BAND, "band", factory, lhs, rhs) { } } Modified: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql =================================================================== (Binary files differ) Modified: trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-06 20:05:52 UTC (rev 5000) +++ trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-07 08:39:24 UTC (rev 5001) @@ -423,5 +423,28 @@ Assert.IsNotNull(query); } + + [Test] + public void BitwiseQuery2() + { + var featureSet = FeatureSet.HasAll; + var query = (from o in session.Query<User>() + where (o.Features & featureSet) == featureSet + select o).ToList(); + + Assert.AreEqual(1, query.Count); + } + + [Test] + public void BitwiseQuery3() + { + var featureSet = FeatureSet.HasThat; + var query = (from o in session.Query<User>() + where ((o.Features | featureSet) & featureSet) == featureSet + select o).ToList(); + + Assert.AreEqual(3, query.Count); + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-07-06 20:06:01
|
Revision: 5000 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5000&view=rev Author: steverstrong Date: 2010-07-06 20:05:52 +0000 (Tue, 06 Jul 2010) Log Message: ----------- Added a couple more tests Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs 2010-07-06 19:37:06 UTC (rev 4999) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs 2010-07-06 20:05:52 UTC (rev 5000) @@ -1291,7 +1291,6 @@ [Category("JOIN")] [Test(Description = "This sample shows how to construct a join where one side is nullable and the other isn't.")] - [Ignore("TODO nullable join")] public void DLinqJoin10() { var q = @@ -1517,7 +1516,6 @@ [Category("JOIN")] [Test(Description = "This sample projects a 'let' expression resulting from a join.")] - [Ignore("TODO let expression")] public void DLinqJoin8() { var q = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-07-06 19:37:12
|
Revision: 4999 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4999&view=rev Author: steverstrong Date: 2010-07-06 19:37:06 +0000 (Tue, 06 Jul 2010) Log Message: ----------- Fix for JIRA NH-2225 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql trunk/nhibernate/src/NHibernate.Test/Linq/Entities/User.cs trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/User.hbm.xml trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-07-06 19:37:06 UTC (rev 4999) @@ -410,5 +410,15 @@ { return new HqlClass(_factory); } + + public HqlBitwiseAnd BitwiseAnd(HqlExpression lhs, HqlExpression rhs) + { + return new HqlBitwiseAnd(_factory, lhs, rhs); + } + + public HqlBitwiseOr BitwiseOr(HqlExpression lhs, HqlExpression rhs) + { + return new HqlBitwiseOr(_factory, lhs, rhs); + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-07-06 19:37:06 UTC (rev 4999) @@ -705,6 +705,22 @@ } } + public class HqlBitwiseOr : HqlExpression + { + public HqlBitwiseOr(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.BAND, "band", factory, lhs, rhs) + { + } + } + + public class HqlBitwiseAnd : HqlExpression + { + public HqlBitwiseAnd(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.BOR, "bor", factory, lhs, rhs) + { + } + } + public class HqlLeft : HqlTreeNode { public HqlLeft(IASTFactory factory) Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-07-06 19:37:06 UTC (rev 4999) @@ -290,10 +290,14 @@ return _hqlTreeBuilder.Inequality(lhs, rhs); case ExpressionType.And: + return _hqlTreeBuilder.BitwiseAnd(lhs, rhs); + case ExpressionType.AndAlso: return _hqlTreeBuilder.BooleanAnd(lhs.AsBooleanExpression(), rhs.AsBooleanExpression()); case ExpressionType.Or: + return _hqlTreeBuilder.BitwiseOr(lhs, rhs); + case ExpressionType.OrElse: return _hqlTreeBuilder.BooleanOr(lhs.AsBooleanExpression(), rhs.AsBooleanExpression()); Modified: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql =================================================================== (Binary files differ) Modified: trunk/nhibernate/src/NHibernate.Test/Linq/Entities/User.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/User.cs 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate.Test/Linq/Entities/User.cs 2010-07-06 19:37:06 UTC (rev 4999) @@ -4,6 +4,15 @@ namespace NHibernate.Test.Linq.Entities { + [Flags] + public enum FeatureSet + { + HasThis = 1, + HasThat = 2, + HasMore = 4, + HasAll = 8 + } + public interface IUser { int Id { get; set; } @@ -12,6 +21,7 @@ DateTime RegisteredAt { get; set; } DateTime? LastLoginDate { get; set; } UserComponent Component { get; set; } + FeatureSet Features { get; set; } Role Role { get; set; } EnumStoredAsString Enum1 { get; set; } EnumStoredAsInt32 Enum2 { get; set; } @@ -33,6 +43,8 @@ public virtual Role Role { get; set; } + public virtual FeatureSet Features { get; set; } + public virtual EnumStoredAsString Enum1 { get; set; } public virtual EnumStoredAsInt32 Enum2 { get; set; } Modified: trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/User.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/User.hbm.xml 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/User.hbm.xml 2010-07-06 19:37:06 UTC (rev 4999) @@ -18,6 +18,8 @@ <property name="Enum2" not-null="true" /> + <property name="Features" not-null="true" /> + <many-to-one name="Role" class="Role"> <column name="RoleId" /> </many-to-one> Modified: trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-06 09:14:59 UTC (rev 4998) +++ trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-06 19:37:06 UTC (rev 4999) @@ -412,5 +412,16 @@ Assert.AreEqual(2, query.Count); } + + [Test] + public void BitwiseQuery() + { + var featureSet = FeatureSet.HasMore; + var query = (from o in session.Query<User>() + where (o.Features & featureSet) == featureSet + select o).ToList(); + + Assert.IsNotNull(query); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-07-06 09:15:06
|
Revision: 4998 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4998&view=rev Author: steverstrong Date: 2010-07-06 09:14:59 +0000 (Tue, 06 Jul 2010) Log Message: ----------- Fixed semantics of .Single Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirst.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirstOrSingleBase.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSingle.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirst.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirst.cs 2010-07-03 14:46:23 UTC (rev 4997) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirst.cs 2010-07-06 09:14:59 UTC (rev 4998) @@ -11,7 +11,9 @@ ? ReflectionHelper.GetMethod(() => Queryable.FirstOrDefault<object>(null)) : ReflectionHelper.GetMethod(() => Queryable.First<object>(null)); - ProcessFirstOrSingle(firstMethod, queryModelVisitor, tree); + AddClientSideEval(firstMethod, queryModelVisitor, tree); + + tree.AddAdditionalCriteria((q, p) => q.SetMaxResults(1)); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirstOrSingleBase.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirstOrSingleBase.cs 2010-07-03 14:46:23 UTC (rev 4997) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirstOrSingleBase.cs 2010-07-06 09:14:59 UTC (rev 4998) @@ -5,7 +5,7 @@ { public class ProcessFirstOrSingleBase { - protected static void ProcessFirstOrSingle(MethodInfo target, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) + protected static void AddClientSideEval(MethodInfo target, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { target = target.MakeGenericMethod(queryModelVisitor.CurrentEvaluationType.DataType); @@ -17,7 +17,6 @@ parameter), parameter); - tree.AddAdditionalCriteria((q, p) => q.SetMaxResults(1)); tree.AddPostExecuteTransformer(lambda); } } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSingle.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSingle.cs 2010-07-03 14:46:23 UTC (rev 4997) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSingle.cs 2010-07-06 09:14:59 UTC (rev 4998) @@ -11,7 +11,7 @@ ? ReflectionHelper.GetMethod(() => Queryable.SingleOrDefault<object>(null)) : ReflectionHelper.GetMethod(() => Queryable.Single<object>(null)); - ProcessFirstOrSingle(firstMethod, queryModelVisitor, tree); + AddClientSideEval(firstMethod, queryModelVisitor, tree); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-03 14:46:23 UTC (rev 4997) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-06 09:14:59 UTC (rev 4998) @@ -1,4 +1,5 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -43,35 +44,35 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL"> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Data.OracleClient" /> + <Reference Include="System.ServiceModel"> + <RequiredTargetFramework>3.0</RequiredTargetFramework> + </Reference> + <Reference Include="System.Transactions" /> + <Reference Include="System.Web" /> + <Reference Include="System.Xml" /> + <Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Antlr3.Runtime.dll</HintPath> </Reference> - <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> - <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="Remotion.Data.Linq, Version=1.13.9.2, Culture=neutral, PublicKeyToken=cab60358ab4081ea, processorArchitecture=MSIL"> + <Reference Include="Remotion.Data.Linq, Version=1.13.41.2, Culture=neutral, PublicKeyToken=cab60358ab4081ea"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Remotion.Data.Linq.dll</HintPath> </Reference> - <Reference Include="System" /> - <Reference Include="System.configuration" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data" /> - <Reference Include="System.Data.OracleClient" /> - <Reference Include="System.ServiceModel"> - <RequiredTargetFramework>3.0</RequiredTargetFramework> - </Reference> - <Reference Include="System.Transactions" /> - <Reference Include="System.Web" /> - <Reference Include="System.Xml" /> + <Reference Include="System.Configuration" /> </ItemGroup> <ItemGroup> <Compile Include="ADOException.cs" /> Modified: trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-03 14:46:23 UTC (rev 4997) +++ trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-07-06 09:14:59 UTC (rev 4998) @@ -82,6 +82,14 @@ select user).Single(); } + [Test] + [ExpectedException(typeof(InvalidOperationException))] + public void SingleElementWithQueryThatReturnsMultipleResults() + { + var query = (from user in db.Users + select user).Single(); + } + [Test] public void SingleOrDefaultElementWithQueryThatReturnsNoResults() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-07-03 14:46:30
|
Revision: 4997 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4997&view=rev Author: julian-maughan Date: 2010-07-03 14:46:23 +0000 (Sat, 03 Jul 2010) Log Message: ----------- Fixed badly named class: AdoNetWithDistrubtedTransactionFactory. Retained original naming for backwards compatibility, but marked as Obsolete. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistrubtedTransactionFactory.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2010-06-28 12:11:26 UTC (rev 4996) +++ trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2010-07-03 14:46:23 UTC (rev 4997) @@ -352,7 +352,7 @@ private static ITransactionFactory CreateTransactionFactory(IDictionary<string, string> properties) { string className = PropertiesHelper.GetString( - Environment.TransactionStrategy, properties, typeof(AdoNetWithDistrubtedTransactionFactory).FullName); + Environment.TransactionStrategy, properties, typeof(AdoNetWithDistributedTransactionFactory).FullName); log.Info("Transaction factory: " + className); try Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-06-28 12:11:26 UTC (rev 4996) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-07-03 14:46:23 UTC (rev 4997) @@ -349,6 +349,7 @@ <Compile Include="StaleObjectStateException.cs" /> <Compile Include="Tool\hbm2ddl\SchemaExport.cs" /> <Compile Include="TransactionException.cs" /> + <Compile Include="Transaction\AdoNetWithDistributedTransactionFactory.cs" /> <Compile Include="Transaction\AdoTransaction.cs" /> <Compile Include="Transaction\ITransactionFactory.cs" /> <Compile Include="Transform\AliasToEntityMapResultTransformer.cs" /> Added: trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs 2010-07-03 14:46:23 UTC (rev 4997) @@ -0,0 +1,175 @@ +using System; +using System.Collections; +using System.Transactions; +using log4net; +using NHibernate.Engine; +using NHibernate.Engine.Transaction; +using NHibernate.Impl; + +namespace NHibernate.Transaction +{ + public class AdoNetWithDistributedTransactionFactory : ITransactionFactory + { + private static readonly ILog logger = LogManager.GetLogger(typeof (AbstractSessionImpl)); + + private readonly AdoNetTransactionFactory adoNetTransactionFactory = new AdoNetTransactionFactory(); + + public void Configure(IDictionary props) + { + } + + public ITransaction CreateTransaction(ISessionImplementor session) + { + return new AdoTransaction(session); + } + + public void EnlistInDistributedTransactionIfNeeded(ISessionImplementor session) + { + if (session.TransactionContext != null) + return; + + if (System.Transactions.Transaction.Current == null) + return; + + var transactionContext = new DistributedTransactionContext(session, + System.Transactions.Transaction.Current); + session.TransactionContext = transactionContext; + logger.DebugFormat("enlisted into DTC transaction: {0}", + transactionContext.AmbientTransation.IsolationLevel); + session.AfterTransactionBegin(null); + transactionContext.AmbientTransation.TransactionCompleted += + delegate(object sender, TransactionEventArgs e) + { + using (new SessionIdLoggingContext(session.SessionId)) + { + bool wasSuccessful = false; + try + { + wasSuccessful = e.Transaction.TransactionInformation.Status + == TransactionStatus.Committed; + } + catch (ObjectDisposedException ode) + { + logger.Warn("Completed transaction was disposed, assuming transaction rollback", ode); + } + session.AfterTransactionCompletion(wasSuccessful, null); + if (transactionContext.ShouldCloseSessionOnDistributedTransactionCompleted) + { + session.CloseSessionFromDistributedTransaction(); + } + session.TransactionContext = null; + } + }; + transactionContext.AmbientTransation.EnlistVolatile(transactionContext, + EnlistmentOptions.EnlistDuringPrepareRequired); + } + + public bool IsInDistributedActiveTransaction(ISessionImplementor session) + { + var distributedTransactionContext = ((DistributedTransactionContext) session.TransactionContext); + return distributedTransactionContext != null && + distributedTransactionContext.IsInActiveTransaction; + } + + public void ExecuteWorkInIsolation(ISessionImplementor session, IIsolatedWork work, bool transacted) + { + using(var tx = new TransactionScope(TransactionScopeOption.Suppress)) + { + // instead of duplicating the logic, we suppress the DTC transaction and create + // our own transaction instead + adoNetTransactionFactory.ExecuteWorkInIsolation(session, work, transacted); + tx.Complete(); + } + } + + public class DistributedTransactionContext : ITransactionContext, IEnlistmentNotification + { + public System.Transactions.Transaction AmbientTransation { get; set; } + public bool ShouldCloseSessionOnDistributedTransactionCompleted { get; set; } + private readonly ISessionImplementor sessionImplementor; + public bool IsInActiveTransaction; + + public DistributedTransactionContext(ISessionImplementor sessionImplementor, System.Transactions.Transaction transaction) + { + this.sessionImplementor = sessionImplementor; + AmbientTransation = transaction.Clone(); + IsInActiveTransaction = true; + } + + #region IEnlistmentNotification Members + + void IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment) + { + using (new SessionIdLoggingContext(sessionImplementor.SessionId)) + { + try + { + using (var tx = new TransactionScope(AmbientTransation)) + { + sessionImplementor.BeforeTransactionCompletion(null); + if (sessionImplementor.FlushMode != FlushMode.Never && sessionImplementor.ConnectionManager.IsConnected) + { + using (sessionImplementor.ConnectionManager.FlushingFromDtcTransaction) + { + logger.Debug(string.Format("[session-id={0}] Flushing from Dtc Transaction", sessionImplementor.SessionId)); + sessionImplementor.Flush(); + } + } + logger.Debug("prepared for DTC transaction"); + + tx.Complete(); + } + preparingEnlistment.Prepared(); + } + catch (Exception exception) + { + logger.Error("DTC transaction prepre phase failed", exception); + preparingEnlistment.ForceRollback(exception); + } + } + } + + void IEnlistmentNotification.Commit(Enlistment enlistment) + { + using (new SessionIdLoggingContext(sessionImplementor.SessionId)) + { + logger.Debug("committing DTC transaction"); + // we have nothing to do here, since it is the actual + // DB connection that will commit the transaction + enlistment.Done(); + IsInActiveTransaction = false; + } + } + + void IEnlistmentNotification.Rollback(Enlistment enlistment) + { + using (new SessionIdLoggingContext(sessionImplementor.SessionId)) + { + sessionImplementor.AfterTransactionCompletion(false, null); + logger.Debug("rolled back DTC transaction"); + enlistment.Done(); + IsInActiveTransaction = false; + } + } + + void IEnlistmentNotification.InDoubt(Enlistment enlistment) + { + using (new SessionIdLoggingContext(sessionImplementor.SessionId)) + { + sessionImplementor.AfterTransactionCompletion(false, null); + logger.Debug("DTC transaction is in doubt"); + enlistment.Done(); + IsInActiveTransaction = false; + } + } + + #endregion + + public void Dispose() + { + if (AmbientTransation != null) + AmbientTransation.Dispose(); + } + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistrubtedTransactionFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistrubtedTransactionFactory.cs 2010-06-28 12:11:26 UTC (rev 4996) +++ trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistrubtedTransactionFactory.cs 2010-07-03 14:46:23 UTC (rev 4997) @@ -1,175 +1,9 @@ using System; -using System.Collections; -using System.Transactions; -using log4net; -using NHibernate.Engine; -using NHibernate.Engine.Transaction; -using NHibernate.Impl; namespace NHibernate.Transaction { - public class AdoNetWithDistrubtedTransactionFactory : ITransactionFactory + [Obsolete("Use renamed class: AdoNetWithDistributedTransactionFactory")] + public class AdoNetWithDistrubtedTransactionFactory : AdoNetWithDistributedTransactionFactory { - private static readonly ILog logger = LogManager.GetLogger(typeof (AbstractSessionImpl)); - private readonly AdoNetTransactionFactory adoNetTransactionFactory = new AdoNetTransactionFactory(); - - - public void Configure(IDictionary props) - { - - } - - public ITransaction CreateTransaction(ISessionImplementor session) - { - return new AdoTransaction(session); - } - - public void EnlistInDistributedTransactionIfNeeded(ISessionImplementor session) - { - if (session.TransactionContext != null) - return; - if (System.Transactions.Transaction.Current == null) - return; - var transactionContext = new DistributedTransactionContext(session, - System.Transactions.Transaction.Current); - session.TransactionContext = transactionContext; - logger.DebugFormat("enlisted into DTC transaction: {0}", - transactionContext.AmbientTransation.IsolationLevel); - session.AfterTransactionBegin(null); - transactionContext.AmbientTransation.TransactionCompleted += - delegate(object sender, TransactionEventArgs e) - { - using (new SessionIdLoggingContext(session.SessionId)) - { - bool wasSuccessful = false; - try - { - wasSuccessful = e.Transaction.TransactionInformation.Status - == TransactionStatus.Committed; - } - catch (ObjectDisposedException ode) - { - logger.Warn("Completed transaction was disposed, assuming transaction rollback", ode); - } - session.AfterTransactionCompletion(wasSuccessful, null); - if (transactionContext.ShouldCloseSessionOnDistributedTransactionCompleted) - { - session.CloseSessionFromDistributedTransaction(); - } - session.TransactionContext = null; - } - }; - transactionContext.AmbientTransation.EnlistVolatile(transactionContext, - EnlistmentOptions.EnlistDuringPrepareRequired); - - } - - public bool IsInDistributedActiveTransaction(ISessionImplementor session) - { - var distributedTransactionContext = ((DistributedTransactionContext) session.TransactionContext); - return distributedTransactionContext != null && - distributedTransactionContext.IsInActiveTransaction; - } - - public void ExecuteWorkInIsolation(ISessionImplementor session, IIsolatedWork work, bool transacted) - { - using(var tx = new TransactionScope(TransactionScopeOption.Suppress)) - { - // instead of duplicating the logic, we suppress the DTC transaction and create - // our own transaction instead - adoNetTransactionFactory.ExecuteWorkInIsolation(session, work, transacted); - tx.Complete(); - } - } - - public class DistributedTransactionContext : ITransactionContext, IEnlistmentNotification - { - public System.Transactions.Transaction AmbientTransation { get; set; } - public bool ShouldCloseSessionOnDistributedTransactionCompleted { get; set; } - private readonly ISessionImplementor sessionImplementor; - public bool IsInActiveTransaction; - - public DistributedTransactionContext(ISessionImplementor sessionImplementor, System.Transactions.Transaction transaction) - { - this.sessionImplementor = sessionImplementor; - AmbientTransation = transaction.Clone(); - IsInActiveTransaction = true; - } - - #region IEnlistmentNotification Members - - void IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment) - { - using (new SessionIdLoggingContext(sessionImplementor.SessionId)) - { - try - { - using (var tx = new TransactionScope(AmbientTransation)) - { - sessionImplementor.BeforeTransactionCompletion(null); - if (sessionImplementor.FlushMode != FlushMode.Never && sessionImplementor.ConnectionManager.IsConnected) - { - using (sessionImplementor.ConnectionManager.FlushingFromDtcTransaction) - { - logger.Debug(string.Format("[session-id={0}] Flushing from Dtc Transaction", sessionImplementor.SessionId)); - sessionImplementor.Flush(); - } - } - logger.Debug("prepared for DTC transaction"); - - tx.Complete(); - } - preparingEnlistment.Prepared(); - } - catch (Exception exception) - { - logger.Error("DTC transaction prepre phase failed", exception); - preparingEnlistment.ForceRollback(exception); - } - } - } - - void IEnlistmentNotification.Commit(Enlistment enlistment) - { - using (new SessionIdLoggingContext(sessionImplementor.SessionId)) - { - logger.Debug("committing DTC transaction"); - // we have nothing to do here, since it is the actual - // DB connection that will commit the transaction - enlistment.Done(); - IsInActiveTransaction = false; - } - } - - void IEnlistmentNotification.Rollback(Enlistment enlistment) - { - using (new SessionIdLoggingContext(sessionImplementor.SessionId)) - { - sessionImplementor.AfterTransactionCompletion(false, null); - logger.Debug("rolled back DTC transaction"); - enlistment.Done(); - IsInActiveTransaction = false; - } - } - - void IEnlistmentNotification.InDoubt(Enlistment enlistment) - { - using (new SessionIdLoggingContext(sessionImplementor.SessionId)) - { - sessionImplementor.AfterTransactionCompletion(false, null); - logger.Debug("DTC transaction is in doubt"); - enlistment.Done(); - IsInActiveTransaction = false; - } - } - - #endregion - - public void Dispose() - { - if (AmbientTransation != null) - AmbientTransation.Dispose(); - } - } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs 2010-06-28 12:11:26 UTC (rev 4996) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs 2010-07-03 14:46:23 UTC (rev 4997) @@ -27,7 +27,7 @@ Configuration configuration = new Configuration(); ISessionFactoryImplementor sessionFactory = (ISessionFactoryImplementor)configuration.BuildSessionFactory(); - Assert.IsInstanceOfType(typeof(NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory), + Assert.IsInstanceOfType(typeof(NHibernate.Transaction.AdoNetWithDistributedTransactionFactory), sessionFactory.Settings.TransactionFactory); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-28 12:11:33
|
Revision: 4996 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4996&view=rev Author: fabiomaulo Date: 2010-06-28 12:11:26 +0000 (Mon, 28 Jun 2010) Log Message: ----------- - actualized nunit.framework to last released - added SharpTestsEx - Fix NH-2230 (<parent> tag does not allow any accessor) Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/lib/net/3.5/nunit.framework.dll trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/nhibernate-mapping.xsd trunk/nhibernate/src/NHibernate.Everything.sln trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.dll trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.xml trunk/nhibernate/lib/net/3.5/SharpTestsEx_License.txt trunk/nhibernate/lib/net/3.5/nunit.framework.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2230/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2230/Domain.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2230/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2230/Mappings.hbm.xml Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2010-06-28 10:32:18 UTC (rev 4995) +++ trunk/nhibernate/default.build 2010-06-28 12:11:26 UTC (rev 4996) @@ -331,7 +331,8 @@ <copy todir="${bin-pack.tests}"> <fileset basedir="${bin.dir}"> <include name="nunit*" /> - <include name="NHibernate.Domain*" /> + <include name="SharpTestsEx*" /> + <include name="NHibernate.Domain*" /> <include name="NHibernate.Test*" /> </fileset> </copy> Added: trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.xml (rev 0) +++ trunk/nhibernate/lib/net/3.5/SharpTestsEx.NUnit.xml 2010-06-28 12:11:26 UTC (rev 4996) @@ -0,0 +1,772 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>SharpTestsEx.NUnit</name> + </assembly> + <members> + <member name="T:SharpTestsEx.ActionAssert"> + <summary> + Assertion for <see cref="T:System.Action"/>. + </summary> + </member> + <member name="M:SharpTestsEx.ActionAssert.Throws``1(System.Action)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> throws a specific <see cref="T:System.Exception"/>. + </summary> + <typeparam name="T">The specific expected <see cref="T:System.Exception"/>.</typeparam> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + <returns>The <see cref="T:System.Exception"/>.</returns> + <exception cref="T:SharpTestsEx.AssertException">The <paramref name="action"/> does not throws the expected <see cref="T:System.Exception"/>. </exception> + </member> + <member name="M:SharpTestsEx.ActionAssert.Throws``1(System.Action,System.String)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> throws a specific <see cref="T:System.Exception"/>. + </summary> + <typeparam name="T">The specific expected <see cref="T:System.Exception"/>.</typeparam> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + <param name="customMessage">A message to display if the assertion fails. This message can be seen in the unit test results. </param> + <returns>The <see cref="T:System.Exception"/>.</returns> + <exception cref="T:SharpTestsEx.AssertException">The <paramref name="action"/> does not throws the expected <see cref="T:System.Exception"/>. </exception> + </member> + <member name="M:SharpTestsEx.ActionAssert.Throws(System.Action)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> throws an <see cref="T:System.Exception"/>. + </summary> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + <returns>The <see cref="T:System.Exception"/>.</returns> + <exception cref="T:SharpTestsEx.AssertException">The <paramref name="action"/> does not throws an <see cref="T:System.Exception"/>. </exception> + </member> + <member name="M:SharpTestsEx.ActionAssert.Throws(System.Action,System.String)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> throws an <see cref="T:System.Exception"/>. + </summary> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + <param name="customMessage">A message to display if the assertion fails. This message can be seen in the unit test results. </param> + <returns>The <see cref="T:System.Exception"/>.</returns> + <exception cref="T:SharpTestsEx.AssertException">The <paramref name="action"/> does not throws the expected <see cref="T:System.Exception"/>. </exception> + </member> + <member name="M:SharpTestsEx.ActionAssert.NotThrow(System.Action)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> does not throw any <see cref="T:System.Exception"/>. + </summary> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + </member> + <member name="M:SharpTestsEx.ActionAssert.NotThrow(System.Action,System.String)"> + <summary> + Verifies that the given <see cref="T:System.Action"/> does not throw any <see cref="T:System.Exception"/>. + </summary> + <param name="action">The given <see cref="T:System.Action"/> to execute.</param> + <param name="customMessage">A message to display if the assertion fails. This message can be seen in the unit test results. </param> + </member> + <member name="T:SharpTestsEx.Assertions.ExpressionStringBuilder"> + <summary> + The intention of <see cref="T:SharpTestsEx.Assertions.ExpressionStringBuilder"/> is to create a more readable + string representation for the failure message. + </summary> + </member> + <member name="T:SharpTestsEx.Assertions.NullAssertion`1"> + <summary> + Verifies that the specified object is null. The assertion fails if it is not null. + </summary> + <typeparam name="TA">Type of the actual value subject of the assertion.</typeparam> + </member> + <member name="T:SharpTestsEx.Assertions.Assertion`2"> + <summary> + Represent a Assertion template where the real logic is delegated. + </summary> + <typeparam name="TA">Type of the actual value.</typeparam> + <typeparam name="TE">Type of the expected value.</typeparam> + </member> + <member name="M:SharpTestsEx.Assertions.NullAssertion`1.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:SharpTestsEx.Assertions.NullAssertion`1"/> class. + </summary> + </member> + <member name="T:SharpTestsEx.Assertions.ObjectEqualsAssertion`2"> + <summary> + Verifies that two specified generic type data are equal. The assertion fails if they are not equal. + </summary> + <typeparam name="TA">Type of the actual value.</typeparam> + <typeparam name="TE">Type of the expected value.</typeparam> + <remarks> + The comparison is done ny the base <see cref="M:System.Object.Equals(System.Object,System.Object)"/>. + </remarks> + </member> + <member name="M:SharpTestsEx.Assertions.ObjectEqualsAssertion`2.#ctor(`1)"> + <summary> + Initializes a new instance of the <see cref="T:SharpTestsEx.Assertions.ObjectEqualsAssertion`2"/> class. + </summary> + <param name="expected">The value to compare.</param> + </member> + <member name="T:SharpTestsEx.Assertions.SameInstanceAssertion`2"> + <summary> + Verifies that two specified instances are the same object instance.. + </summary> + <typeparam name="TA">Type of the actual value.</typeparam> + <typeparam name="TE">Type of the expected value.</typeparam> + </member> + <member name="M:SharpTestsEx.Assertions.SameInstanceAssertion`2.#ctor(`1)"> + <summary> + Initializes a new instance of the <see cref="T:SharpTestsEx.Assertions.SameInstanceAssertion`2"/> class. + </summary> + <param name="expected">The value to compare.</param> + </member> + <member name="T:SharpTestsEx.ClassConstraintsExtensions"> + <summary> + Extensions for constraint over object instances. + </summary> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.SameInstanceAs(SharpTestsEx.IClassBeConstraints,System.Object)"> + <summary> + Verifies that actual is the same instance than <paramref name="expected"/>. + </summary> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <param name="expected">The expected object instance.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.InstanceOf``1(SharpTestsEx.IClassBeConstraints)"> + <summary> + Verifies that actual is an instance of <typeparamref name="T"/>. + </summary> + <typeparam name="T">The <see cref="T:System.Type"/> expected.</typeparam> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.AssignableFrom``1(SharpTestsEx.IClassBeConstraints)"> + <summary> + Verifies that actual instance is assignable from <typeparamref name="T"/>. + </summary> + <typeparam name="T">The <see cref="T:System.Type"/> expected.</typeparam> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.AssignableTo``1(SharpTestsEx.IClassBeConstraints)"> + <summary> + Verifies that actual instance is assignable to <typeparamref name="T"/>. + </summary> + <typeparam name="T">The <see cref="T:System.Type"/> expected.</typeparam> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.BinarySerializable(SharpTestsEx.IClassBeConstraints)"> + <summary> + Verifies that actual instance is serializable using <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter"/>. + </summary> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ClassConstraintsExtensions.XmlSerializable(SharpTestsEx.IClassBeConstraints)"> + <summary> + Verifies that actual instance is serializable using <see cref="T:System.Xml.Serialization.XmlSerializer"/>. + </summary> + <param name="constraint">The <see cref="T:SharpTestsEx.IClassBeConstraints"/> extented.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="T:SharpTestsEx.Executing"> + <summary> + Useful class to avoid the creation of new Action. + </summary> + <remarks> + This class can be used when the instance of the class under test is no available; + typically to test a constructor. + When you have an instance of the class under test the most appropite way to test an action + is the extension <see cref="M:SharpTestsEx.Extensions.Executing``1(``0,System.Linq.Expressions.Expression{System.Action{``0}})"/>. + </remarks> + <example> + <code> + Executing.This(() => new AClass(null)).Should().Throw(); + </code> + <code> + Executing.This(() => new AClass(null)).Should().Throw{ArgumentNullException}() + .And.ValueOf + .ParamName.Should().Be("obj"); + </code> + </example> + </member> + <member name="T:SharpTestsEx.IConstraints`1"> + <summary> + Basic contract for a generic constraint. + </summary> + <typeparam name="T">The type of the 'actual' value subject of the test.</typeparam> + </member> + <member name="M:SharpTestsEx.IExpressionActionConstraints`1.Throws``1"> + <summary> + Verifies that the <see cref="T:System.Action`1"/> throws a specific <see cref="T:System.Exception"/>. + </summary> + <typeparam name="TException">The specific <see cref="T:System.Exception"/> subclass expected. </typeparam> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IExpressionActionConstraints`1.Throws"> + <summary> + Verifies that the <see cref="T:System.Action"/> throws an <see cref="T:System.Exception"/>. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IExpressionActionConstraints`1.NotThrows"> + <summary> + Verifies that the <see cref="T:System.Action"/> does not throw any <see cref="T:System.Exception"/>. + </summary> + </member> + <member name="T:SharpTestsEx.EnumerableExtensions"> + <summary> + <see cref="T:System.Collections.Generic.IEnumerable`1"/> etensions methods. + </summary> + </member> + <member name="M:SharpTestsEx.EnumerableExtensions.PositionOfFirstDifference``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0})"> + <summary> + Find the first position where two sequence differ + </summary> + <typeparam name="TSource">The type of the elements of the input sequences.</typeparam> + <param name="first">An <see cref="T:System.Collections.Generic.IEnumerable`1"/> to compare to second</param> + <param name="second">An <see cref="T:System.Collections.Generic.IEnumerable`1"/> to compare to the first sequence. </param> + <returns>The position of the first difference; otherwise -1 where the two sequences has the same sequence.</returns> + </member> + <member name="T:SharpTestsEx.ExceptionExtensions"> + <summary> + Useful extensions to test <see cref="T:System.Exception"/>s. + </summary> + </member> + <member name="M:SharpTestsEx.ExceptionExtensions.InnerExceptions(System.Exception)"> + <summary> + Returns a sequence of all Inner Exceptions. + </summary> + <param name="source">The root <see cref="T:System.Exception"/> </param> + <returns>A <see cref="T:System.Collections.Generic.IEnumerable`1"/> of all Inner Exceptions</returns> + </member> + <member name="M:SharpTestsEx.ExceptionExtensions.Exceptions(System.Exception)"> + <summary> + Returns a sequence of including the root <see cref="T:System.Exception"/> and all Inner Exceptions. + </summary> + <param name="source">The root <see cref="T:System.Exception"/> </param> + <returns>A <see cref="T:System.Collections.Generic.IEnumerable`1"/> of including the root <see cref="T:System.Exception"/> and all Inner Exceptions.</returns> + </member> + <member name="T:SharpTestsEx.IActionConstraints"> + <summary> + Constraints for <see cref="T:System.Action"/>. + </summary> + </member> + <member name="M:SharpTestsEx.IActionConstraints.Throw``1"> + <summary> + Verifies that the <see cref="T:System.Action"/> throws a specific <see cref="T:System.Exception"/>. + </summary> + <typeparam name="TException">The specific <see cref="T:System.Exception"/> subclass expected. </typeparam> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IActionConstraints.Throw"> + <summary> + Verifies that the <see cref="T:System.Action"/> throws an. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IActionConstraints.NotThrow"> + <summary> + Verifies that the <see cref="T:System.Action"/> does not throw any <see cref="T:System.Exception"/>. + </summary> + </member> + <member name="P:SharpTestsEx.IActionAndConstraints`2.Exception"> + <summary> + The instance <see cref="P:SharpTestsEx.IActionAndConstraints`2.Exception"/> thrown. + </summary> + <remarks> + <example> + <code> + var ex = (new Action(() => new AClass(null))).Should().Throw().Exception; + </code> + </example> + </remarks> + </member> + <member name="T:SharpTestsEx.IThrowConstraints`1"> + <summary> + Chainable constraint for <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> + </summary> + <typeparam name="TException">The specific <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> subclass expected. </typeparam> + </member> + <member name="P:SharpTestsEx.IThrowConstraints`1.ValueOf"> + <summary> + The <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> thrown. + </summary> + <remarks> + Allow an readable chained way to begin a new assertion based on one of the properties + of the expected <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> + <example> + <code> + (new Action(() => new AClass(null))) + .Should().Throw{ArgumentNullException}() + .And.ValueOf.ParamName + .Should().Be.EqualTo("obj"); + </code> + </example> + </remarks> + </member> + <member name="P:SharpTestsEx.IThrowConstraints`1.Exception"> + <summary> + The instance <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> thrown. + </summary> + <remarks> + Allow an readable chained way to begin a new assertion based on the <see cref="P:SharpTestsEx.IThrowConstraints`1.Exception"/> itself. + <example> + <code> + (new Action(() => new AClass(null))) + .Should().Throw() + .And.Exception.Should().Be.InstanceOf{ArgumentException}(); + </code> + </example> + </remarks> + </member> + <member name="T:SharpTestsEx.IAssertionInfo`1"> + <summary> + Assertion information. + </summary> + <typeparam name="T">The type of the value subject of the assertion.</typeparam> + </member> + <member name="P:SharpTestsEx.IAssertionInfo`1.Actual"> + <summary> + Subject of the assertion. + </summary> + </member> + <member name="P:SharpTestsEx.IAssertionInfo`1.IsNegated"> + <summary> + The assertion is negated ? + </summary> + </member> + <member name="P:SharpTestsEx.IAssertionInfo`1.FailureMessage"> + <summary> + The title of the assertion ("message" in MsTests terminology) + </summary> + </member> + <member name="T:SharpTestsEx.IBooleanConstraints"> + <summary> + Constraint over boolean values. + </summary> + </member> + <member name="T:SharpTestsEx.IBooleanBeConstraints"> + <summary> + Constraints for boolean "Should Be" + </summary> + </member> + <member name="M:SharpTestsEx.IBooleanBeConstraints.True"> + <summary> + Verifies that actual is true. + </summary> + </member> + <member name="M:SharpTestsEx.IBooleanBeConstraints.False"> + <summary> + Verifies that actual is false. + </summary> + </member> + <member name="P:SharpTestsEx.ExtensionsImpl.NegableConstraints`2.Not"> + <summary> + Negate next constraint. + </summary> + </member> + <member name="T:SharpTestsEx.IClassConstraints"> + <summary> + Constraint over object instances. + </summary> + </member> + <member name="T:SharpTestsEx.IClassConstraints`1"> + <summary> + Constraints for object instance of a specific gine <see cref="T:System.Type"/>. + </summary> + <typeparam name="TValue">The <see cref="T:System.Type"/> of the instance.</typeparam> + </member> + <member name="P:SharpTestsEx.IClassConstraints`1.ValueOf"> + <summary> + The actual value + </summary> + </member> + <member name="P:SharpTestsEx.IClassConstraints`1.Value"> + <summary> + The actual value + </summary> + </member> + <member name="T:SharpTestsEx.IClassBeConstraints"> + <summary> + Constraints for object instance "Should Be" + </summary> + </member> + <member name="M:SharpTestsEx.IClassBeConstraints.EqualTo(System.Object)"> + <summary> + Verifies that actual is equal to <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IClassBeConstraints.Null"> + <summary> + Verifies that the <see cref="T:System.Object"/> is null. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IClassBeConstraints.OfType``1"> + <summary> + Verifies that the actual is an instance of a specific type. + </summary> + <typeparam name="T">The expected <see cref="T:System.Type"/>.</typeparam> + <returns> + A <see cref="T:SharpTestsEx.IClassConstraints`1"/> for the instance converted to + the specified type to start a chained assertion. + </returns> + </member> + <member name="T:SharpTestsEx.IComparableConstraints`1"> + <summary> + Constraint over <see cref="T:System.IComparable"/> instances. + </summary> + <typeparam name="T">The concrete type of actual value.</typeparam> + </member> + <member name="T:SharpTestsEx.IComparableBeConstraints`1"> + <summary> + Constraints for <see cref="T:System.IComparable"/> instance ("Should Be") + </summary> + <typeparam name="T"></typeparam> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.EqualTo(System.IComparable)"> + <summary> + Verifies that actual is equal to <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.GreaterThan(System.IComparable)"> + <summary> + Verifies that actual is greater than <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.LessThan(System.IComparable)"> + <summary> + Verifies that actual is less than <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.GreaterThanOrEqualTo(System.IComparable)"> + <summary> + Verifies that actual is greater than or equal to <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.LessThanOrEqualTo(System.IComparable)"> + <summary> + Verifies that actual is less than or equal to <paramref name="expected"/>. + </summary> + <param name="expected">The expected instance</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.IComparableBeConstraints`1.IncludedIn(System.IComparable,System.IComparable)"> + <summary> + Verifies that actual is included in the range <paramref name="lowLimit"/>-<paramref name="highLimit"/>. + </summary> + <param name="lowLimit">The less aceptable value.</param> + <param name="highLimit">The higher aceptable value.</param> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ExtensionsImpl.EnumerableBeConstraints`1.Null"> + <summary> + Verifies that the <see cref="T:System.Collections.Generic.IEnumerable`1"/> instance is null. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ExtensionsImpl.EnumerableBeConstraints`1.Empty"> + <summary> + Verifies that the <see cref="T:System.Collections.Generic.IEnumerable`1"/> is empty. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ExtensionsImpl.StringBeConstraints.Null"> + <summary> + Verifies that the <see cref="T:System.String"/> is null. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ExtensionsImpl.StringBeConstraints.Empty"> + <summary> + Verifies that the <see cref="T:System.String"/> is empty. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="M:SharpTestsEx.ExtensionsImpl.TypeBeConstraints.Null"> + <summary> + Verifies that the <see cref="T:System.Type"/> instance is null. + </summary> + <returns>Chainable And constraint</returns> + </member> + <member name="T:SharpTestsEx.MessageBuilderInfo`2"> + <summary> + Collection information to build the failure message + </summary> + <typeparam name="TActual">Type of the actual value.</typeparam> + <typeparam name="TExpected">Type of the expected value.</typeparam> + </member> + <member name="P:SharpTestsEx.MessageBuilderInfo`2.Actual"> + <summary> + The actual value under test. + </summary> + </member> + <member name="P:SharpTestsEx.MessageBuilderInfo`2.Expected"> + <summary> + The expected value of the test. + </summary> + </member> + <member name="P:SharpTestsEx.MessageBuilderInfo`2.AssertionPredicate"> + <summary> + The name of the assertion + </summary> + <example> + "be EqualTo" + </example> + </member> + <member name="P:SharpTestsEx.MessageBuilderInfo`2.CustomMessage"> + <summary> + The user custom message. + </summary> + </member> + <member name="T:SharpTestsEx.ObjectExtensions"> + <summary> + Extensions for any System.Object. + </summary> + </member> + <member name="M:SharpTestsEx.ObjectExtensions.FieldValue``1(System.Object,System.String)"> + <summary> + Allow access to a private field of a class instance. + </summary> + <typeparam name="T">The <see cref="T:System.Type"/> of the field. </typeparam> + <param name="source">The class instance.</param> + <param name="fieldName">The field name.</param> + <returns>The value of the field.</returns> + </member> + <member name="T:SharpTestsEx.Properties.Resources"> + <summary> + A strongly-typed resource class, for looking up localized strings, etc. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ResourceManager"> + <summary> + Returns the cached ResourceManager instance used by this class. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.Culture"> + <summary> + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.AssertionVerb"> + <summary> + Looks up a localized string similar to Should. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.Be"> + <summary> + Looks up a localized string similar to Be. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.EmptyEnumerable"> + <summary> + Looks up a localized string similar to <Empty>. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ExceptionMsgAccessToField"> + <summary> + Looks up a localized string similar to Can't access to a field of a null value.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ExceptionMsgFieldNameTmpl"> + <summary> + Looks up a localized string similar to The class {0} does not contain a field named {1}.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ExceptionMsgInvalidCastTmpl"> + <summary> + Looks up a localized string similar to The class {0} does contain a field named {1} but its type is {2} and not {3}.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ExceptionMsgSerializableNull"> + <summary> + Looks up a localized string similar to Can't check serialization for (null) value.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.ExpectedTmpl"> + <summary> + Looks up a localized string similar to Expected: {0}. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.FailureMsgDifferences"> + <summary> + Looks up a localized string similar to Differences :. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.FailureMsgEnumerableDiffPosTmpl"> + <summary> + Looks up a localized string similar to Values differ at position {0}.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.FailureMsgNotThrow"> + <summary> + Looks up a localized string similar to Not expected exception message:. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.FailureMsgStringDiffPosTmpl"> + <summary> + Looks up a localized string similar to Strings differ at position {0}.. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.FoundTmpl"> + <summary> + Looks up a localized string similar to Found : {0}. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.Negation"> + <summary> + Looks up a localized string similar to Not. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.NullValue"> + <summary> + Looks up a localized string similar to (null). + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeAssignableFrom"> + <summary> + Looks up a localized string similar to Be Assignable From. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeAssignableTo"> + <summary> + Looks up a localized string similar to Be Assignable To. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeBinarySerializable"> + <summary> + Looks up a localized string similar to Be Binary Serializable. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeEmpty"> + <summary> + Looks up a localized string similar to Be Empty. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeEqualTo"> + <summary> + Looks up a localized string similar to Be Equal To. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeGreaterThan"> + <summary> + Looks up a localized string similar to Be Greater Than. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeGreaterThanOrEquaTo"> + <summary> + Looks up a localized string similar to Be Greater than Or Equal to. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeInRange"> + <summary> + Looks up a localized string similar to Be in Range. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeInstanceOf"> + <summary> + Looks up a localized string similar to Be Instance Of. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeLessThan"> + <summary> + Looks up a localized string similar to Be Less Than. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeLessThanOrEqualTo"> + <summary> + Looks up a localized string similar to Be Less than Or Equal to. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeNull"> + <summary> + Looks up a localized string similar to Be Null. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeOrdered"> + <summary> + Looks up a localized string similar to Be Ordered. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeOrderedAscending"> + <summary> + Looks up a localized string similar to Be Ordered ascending. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeOrderedBy"> + <summary> + Looks up a localized string similar to Be Ordered By ({0}). + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeSameAs"> + <summary> + Looks up a localized string similar to Be Same instance As. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeSubClassOf"> + <summary> + Looks up a localized string similar to Be SubClass Of. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeSubsetOf"> + <summary> + Looks up a localized string similar to Be Subset Of. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateBeXmlSerializable"> + <summary> + Looks up a localized string similar to Be Xml Serializable. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateContain"> + <summary> + Looks up a localized string similar to Contain. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateDoesNotThrow"> + <summary> + Looks up a localized string similar to Not throw. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateHaveAttribute"> + <summary> + Looks up a localized string similar to Have Attribute. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateHaveSameSequenceAs"> + <summary> + Looks up a localized string similar to Have Same Sequence As. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateHaveSameValuesAs"> + <summary> + Looks up a localized string similar to Have Same Values As. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateHaveUniqueValues"> + <summary> + Looks up a localized string similar to Have Unique Values. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateHaveValue"> + <summary> + Looks up a localized string similar to Have Value. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateThrow"> + <summary> + Looks up a localized string similar to Throw. + </summary> + </member> + <member name="P:SharpTestsEx.Properties.Resources.PredicateThrows"> + <summary> + Looks up a localized string similar to Throws an exception. + </summary> + </member> + </members> +</doc> Added: trunk/nhibernate/lib/net/3.5/SharpTestsEx_License.txt =================================================================== --- trunk/nhibernate/lib/net/3.5/SharpTestsEx_License.txt (rev 0) +++ trunk/nhibernate/lib/net/3.5/SharpTestsEx_License.txt 2010-06-28 12:11:26 UTC (rev 4996) @@ -0,0 +1,31 @@ +Microsoft Public License (Ms-PL) + +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. + +1. Definitions + +The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. + +A "contribution" is the original software, or any additions or changes to the software. + +A "contributor" is any person that distributes its contribution under this license. + +"Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + +(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + +(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + +3. Conditions and Limitations + +(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + +(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + +(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + +(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + +(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. \ No newline at end of file Modified: trunk/nhibernate/lib/net/3.5/nunit.framework.dll =================================================================== (Binary files differ) Added: trunk/nhibernate/lib/net/3.5/nunit.framework.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/nunit.framework.xml (rev 0) +++ trunk/nhibernate/lib/net/3.5/nunit.framework.xml 2010-06-28 12:11:26 UTC (rev 4996) @@ -0,0 +1,10113 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>nunit.framework</name> + </assembly> + <members> + <member name="T:NUnit.Framework.Constraints.BinaryConstraint"> + <summary> + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. + </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.BinaryConstraint.left"> + <summary> + The first constraint being combined + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.BinaryConstraint.right"> + <summary> + The second constraint being combined + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.BinaryConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Construct a BinaryConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="T:NUnit.Framework.Constraints.AndConstraint"> + <summary> + AndConstraint succeeds only if both members succeed. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an AndConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.Matches(System.Object)"> + <summary> + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. + </summary> + <param name="actual">The actual value</param> + <returns>True if the constraints both succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</param> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.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.OrConstraint"> + <summary> + OrConstraint succeeds if either member succeeds + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an OrConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.Matches(System.Object)"> + <summary> + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + </summary> + <param name="actual">The actual value</param> + <returns>True if either constraint succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</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> +... [truncated message content] |
From: <ric...@us...> - 2010-06-28 10:32:24
|
Revision: 4995 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4995&view=rev Author: ricbrown Date: 2010-06-28 10:32:18 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Updated to IQueryOver.SelectList (syntax was clashing with .Select in intellisense). Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs trunk/nhibernate/src/NHibernate/IQueryOver.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ProjectionsFixture.cs Modified: trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2010-06-27 13:30:16 UTC (rev 4994) +++ trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2010-06-28 10:32:18 UTC (rev 4995) @@ -318,7 +318,7 @@ return this; } - public QueryOver<TRoot, TSubType> Select(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) + public QueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) { criteria.SetProjection(list(new QueryOverProjectionBuilder<TSubType>()).ProjectionList); return this; @@ -681,8 +681,8 @@ IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.Select(params IProjection[] projections) { return Select(projections); } - IQueryOver<TRoot, TSubType> IQueryOver<TRoot, TSubType>.Select(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) - { return Select(list); } + IQueryOver<TRoot, TSubType> IQueryOver<TRoot, TSubType>.SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list) + { return SelectList(list); } IQueryOverOrderBuilder<TRoot,TSubType> IQueryOver<TRoot,TSubType>.OrderBy(Expression<Func<TSubType, object>> path) { return new IQueryOverOrderBuilder<TRoot,TSubType>(this, path); } Modified: trunk/nhibernate/src/NHibernate/IQueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IQueryOver.cs 2010-06-27 13:30:16 UTC (rev 4994) +++ trunk/nhibernate/src/NHibernate/IQueryOver.cs 2010-06-28 10:32:18 UTC (rev 4995) @@ -246,7 +246,7 @@ /// <summary> /// Create a list of projections using a projection builder /// </summary> - IQueryOver<TRoot, TSubType> Select(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list); + IQueryOver<TRoot, TSubType> SelectList(Func<QueryOverProjectionBuilder<TSubType>, QueryOverProjectionBuilder<TSubType>> list); /// <summary> /// Add order expressed as a lambda expression Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2010-06-27 13:30:16 UTC (rev 4994) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2010-06-28 10:32:18 UTC (rev 4995) @@ -162,7 +162,7 @@ PersonSummary summary = null; var actual = s.QueryOver<Person>() - .Select(list => list + .SelectList(list => list .SelectGroup(p => p.Name).WithAlias(() => summary.Name) .Select(Projections.RowCount()).WithAlias(() => summary.Count)) .OrderByAlias(() => summary.Name).Asc @@ -263,7 +263,7 @@ QueryOver<Child> averageChildAge = QueryOver.Of<Child>() - .Select(p => p.SelectAvg(c => c.Age)); + .SelectList(list => list.SelectAvg(c => c.Age)); QueryOver<Child> childCountQuery = QueryOver.Of<Child>() @@ -273,7 +273,7 @@ var nameAndChildCount = s.QueryOver<Person>(() => personAlias) .WithSubquery.Where(p => p.Age <= averageChildAge.As<int>()) - .Select(list => list + .SelectList(list => list .Select(p => p.Name) .SelectSubQuery(childCountQuery).WithAlias(() => childCountAlias)) .OrderByAlias(() => childCountAlias).Desc Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ProjectionsFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ProjectionsFixture.cs 2010-06-27 13:30:16 UTC (rev 4994) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ProjectionsFixture.cs 2010-06-28 10:32:18 UTC (rev 4995) @@ -114,7 +114,7 @@ Person personAgeProjectionAlias = null; var actual = CreateTestQueryOver<Person>(() => personAlias) - .Select(list => list + .SelectList(list => list .SelectAvg(p => p.Age).WithAlias(() => personAgeProjectionAlias) .Select(Projections.Avg("Age")) // allows private properties .SelectAvg(() => personAlias.Age).WithAlias(() => personAlias.Age) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-27 13:30:23
|
Revision: 4994 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4994&view=rev Author: fabiomaulo Date: 2010-06-27 13:30:16 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Starting fix NH-2230 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/Mapping/Component.cs trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2010-06-21 14:57:32 UTC (rev 4993) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2010-06-27 13:30:16 UTC (rev 4994) @@ -305,7 +305,11 @@ // Parent if (componentMapping.Parent != null && !string.IsNullOrEmpty(componentMapping.Parent.name)) { - model.ParentProperty = componentMapping.Parent.name; + model.ParentProperty = new Property + { + Name = componentMapping.Parent.name, + PropertyAccessorName = mappings.DefaultAccess + }; } new PropertiesBinder(Mappings, model, className, path, isNullable, Mappings.Dialect).Bind( Modified: trunk/nhibernate/src/NHibernate/Mapping/Component.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/Component.cs 2010-06-21 14:57:32 UTC (rev 4993) +++ trunk/nhibernate/src/NHibernate/Mapping/Component.cs 2010-06-27 13:30:16 UTC (rev 4994) @@ -16,7 +16,7 @@ private readonly List<Property> properties = new List<Property>(); private System.Type componentClass; private bool embedded; - private string parentProperty; + private Property parentProperty; private PersistentClass owner; private bool dynamic; private bool isKey; @@ -165,7 +165,7 @@ } /// <summary></summary> - public string ParentProperty + public Property ParentProperty { get { return parentProperty; } set { parentProperty = value; } Modified: trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs 2010-06-21 14:57:32 UTC (rev 4993) +++ trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs 2010-06-27 13:30:16 UTC (rev 4994) @@ -28,17 +28,16 @@ { componentClass = component.ComponentClass; - string parentPropertyName = component.ParentProperty; - if (parentPropertyName == null) + var parentProperty = component.ParentProperty; + if (parentProperty == null) { parentSetter = null; parentGetter = null; } else { - IPropertyAccessor pa = PropertyAccessorFactory.GetPropertyAccessor(null); - parentSetter = pa.GetSetter(componentClass, parentPropertyName); - parentGetter = pa.GetGetter(componentClass, parentPropertyName); + parentSetter = parentProperty.GetSetter(componentClass); + parentGetter = parentProperty.GetGetter(componentClass); } if (hasCustomAccessors || !Cfg.Environment.UseReflectionOptimizer) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-06-21 14:57:39
|
Revision: 4993 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4993&view=rev Author: steverstrong Date: 2010-06-21 14:57:32 +0000 (Mon, 21 Jun 2010) Log Message: ----------- Improved support for projections, can now do things like from u in users select SomeCSharpFunction(u.username) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs trunk/nhibernate/src/NHibernate.Test/Linq/ProjectionsTests.cs Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2010-06-19 15:00:19 UTC (rev 4992) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2010-06-21 14:57:32 UTC (rev 4993) @@ -28,56 +28,85 @@ { public class FunctionRegistry { - public static FunctionRegistry Initialise() - { - var registry = new FunctionRegistry(); + public static readonly FunctionRegistry Instance = new FunctionRegistry(); - // TODO - could use reflection here - registry.Register(new QueryableGenerator()); - registry.Register(new StringGenerator()); - registry.Register(new DateTimeGenerator()); - registry.Register(new ICollectionGenerator()); - - return registry; - } - private readonly Dictionary<MethodInfo, IHqlGeneratorForMethod> _registeredMethods = new Dictionary<MethodInfo, IHqlGeneratorForMethod>(); private readonly Dictionary<MemberInfo, IHqlGeneratorForProperty> _registeredProperties = new Dictionary<MemberInfo, IHqlGeneratorForProperty>(); private readonly List<IHqlGeneratorForType> _typeGenerators = new List<IHqlGeneratorForType>(); + private FunctionRegistry() + { + // TODO - could use reflection here + Register(new QueryableGenerator()); + Register(new StringGenerator()); + Register(new DateTimeGenerator()); + Register(new ICollectionGenerator()); + } + public IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method) { IHqlGeneratorForMethod methodGenerator; + if (!TryGetMethodGenerator(method, out methodGenerator)) + { + throw new NotSupportedException(method.ToString()); + } + + return methodGenerator; + } + + public bool TryGetMethodGenerator(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) + { if (method.IsGenericMethod) { method = method.GetGenericMethodDefinition(); } - if (_registeredMethods.TryGetValue(method, out methodGenerator)) + if (GetRegisteredMethodGenerator(method, out methodGenerator)) return true; + + // No method generator registered. Look to see if it's a standard LinqExtensionMethod + if (GetStandardLinqExtensionMethodGenerator(method, out methodGenerator)) return true; + + // Not that either. Let's query each type generator to see if it can handle it + if (GetMethodGeneratorForType(method, out methodGenerator)) return true; + + return false; + } + + private bool GetMethodGeneratorForType(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) + { + methodGenerator = null; + + foreach (var typeGenerator in _typeGenerators.Where(typeGenerator => typeGenerator.SupportsMethod(method))) { - return methodGenerator; + methodGenerator = typeGenerator.GetMethodGenerator(method); + return true; } + return false; + } - // No method generator registered. Look to see if it's a standard LinqExtensionMethod - var attr = method.GetCustomAttributes(typeof (LinqExtensionMethodAttribute), false); + private bool GetStandardLinqExtensionMethodGenerator(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) + { + methodGenerator = null; + + var attr = method.GetCustomAttributes(typeof(LinqExtensionMethodAttribute), false); + if (attr.Length == 1) { // It is - // TODO - cache this? Is it worth it? - return new HqlGeneratorForExtensionMethod((LinqExtensionMethodAttribute) attr[0], method); + methodGenerator = new HqlGeneratorForExtensionMethod((LinqExtensionMethodAttribute)attr[0], method); + return true; } + return false; + } - // Not that either. Let's query each type generator to see if it can handle it - foreach (var typeGenerator in _typeGenerators) + private bool GetRegisteredMethodGenerator(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) + { + if (_registeredMethods.TryGetValue(method, out methodGenerator)) { - if (typeGenerator.SupportsMethod(method)) - { - return typeGenerator.GetMethodGenerator(method); - } + return true; } - - throw new NotSupportedException(method.ToString()); + return false; } public IHqlGeneratorForProperty GetPropertyGenerator(MemberInfo member) Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-06-19 15:00:19 UTC (rev 4992) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-06-21 14:57:32 UTC (rev 4993) @@ -12,7 +12,7 @@ { private readonly HqlTreeBuilder _hqlTreeBuilder; private readonly VisitorParameters _parameters; - static private readonly FunctionRegistry FunctionRegistry = FunctionRegistry.Initialise(); + static private readonly FunctionRegistry FunctionRegistry = FunctionRegistry.Instance; public static HqlTreeNode Visit(Expression expression, VisitorParameters parameters) { Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs 2010-06-19 15:00:19 UTC (rev 4992) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs 2010-06-21 14:57:32 UTC (rev 4993) @@ -3,12 +3,15 @@ using System.Linq.Expressions; using NHibernate.Hql.Ast; using NHibernate.Linq.Expressions; +using NHibernate.Linq.Functions; using Remotion.Data.Linq.Parsing; namespace NHibernate.Linq.Visitors { public class SelectClauseVisitor : ExpressionTreeVisitor { + static private readonly FunctionRegistry FunctionRegistry = FunctionRegistry.Instance; + private HashSet<Expression> _hqlNodes; private readonly ParameterExpression _inputParameter; private readonly VisitorParameters _parameters; @@ -69,7 +72,24 @@ private static bool CanBeEvaluatedInHqlSelectStatement(Expression expression) { - return (expression.NodeType != ExpressionType.MemberInit) && (expression.NodeType != ExpressionType.New); + if ((expression.NodeType == ExpressionType.MemberInit) || (expression.NodeType == ExpressionType.New) || (expression.NodeType == ExpressionType.Constant)) + { + // Hql can't do New or Member Init + return false; + } + + if (expression.NodeType == ExpressionType.Call) + { + // Depends if it's in the function registry + IHqlGeneratorForMethod methodGenerator; + if (!FunctionRegistry.TryGetMethodGenerator(((MethodCallExpression) expression).Method, out methodGenerator)) + { + return false; + } + } + + // Assume all is good + return true; } private static bool CanBeEvaluatedInHqlStatementShortcut(Expression expression) Modified: trunk/nhibernate/src/NHibernate.Test/Linq/ProjectionsTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/ProjectionsTests.cs 2010-06-19 15:00:19 UTC (rev 4992) +++ trunk/nhibernate/src/NHibernate.Test/Linq/ProjectionsTests.cs 2010-06-21 14:57:32 UTC (rev 4993) @@ -147,5 +147,55 @@ Assert.AreEqual(3, query.Intersect(new[] { "ayende", "rahien", "nhibernate" }) .ToList().Count); } + + [Test] + public void CanCallLocalMethodsInSelect() + { + var query = ( + from user in db.Users + orderby user.Id + select FormatName(user.Name, user.LastLoginDate) + ).ToList(); + + Assert.AreEqual(3, query.Count); + Assert.IsTrue(query[0].StartsWith("User ayende logged in at")); + Assert.IsTrue(query[1].StartsWith("User rahien logged in at")); + Assert.IsTrue(query[2].StartsWith("User nhibernate logged in at")); + } + + [Test] + public void CanCallLocalMethodsInAnonymousTypeInSelect() + { + var query = ( + from user in db.Users + orderby user.Id + select new {Title = FormatName(user.Name, user.LastLoginDate)} + ).ToList(); + + Assert.AreEqual(3, query.Count); + Assert.IsTrue(query[0].Title.StartsWith("User ayende logged in at")); + Assert.IsTrue(query[1].Title.StartsWith("User rahien logged in at")); + Assert.IsTrue(query[2].Title.StartsWith("User nhibernate logged in at")); + } + + [Test] + public void CanPerformStringOperationsInSelect() + { + var query = ( + from user in db.Users + orderby user.Id + select new { Title = "User " + user.Name + " logged in at " + user.LastLoginDate } + ).ToList(); + + Assert.AreEqual(3, query.Count); + Assert.IsTrue(query[0].Title.StartsWith("User ayende logged in at")); + Assert.IsTrue(query[1].Title.StartsWith("User rahien logged in at")); + Assert.IsTrue(query[2].Title.StartsWith("User nhibernate logged in at")); + } + + private string FormatName(string name, DateTime? lastLoginDate) + { + return string.Format("User {0} logged in at {1}", name, lastLoginDate); + } } } \ 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: <ric...@us...> - 2010-06-19 15:00:26
|
Revision: 4992 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4992&view=rev Author: ricbrown Date: 2010-06-19 15:00:19 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Changed defaults for command-line build to Sql2008 dialect, and updated NorthwindDbCreator to use static date expected in tests. Modified Paths: -------------- trunk/nhibernate/build-common/nhibernate-properties.xml trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs Modified: trunk/nhibernate/build-common/nhibernate-properties.xml =================================================================== --- trunk/nhibernate/build-common/nhibernate-properties.xml 2010-06-18 05:20:34 UTC (rev 4991) +++ trunk/nhibernate/build-common/nhibernate-properties.xml 2010-06-19 15:00:19 UTC (rev 4992) @@ -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.MsSql2005Dialect" overwrite="false"/> + <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2008Dialect" 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/src/NHibernate.Test/Linq/NorthwindDbCreator.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs 2010-06-18 05:20:34 UTC (rev 4991) +++ trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs 2010-06-19 15:00:19 UTC (rev 4992) @@ -8,6 +8,8 @@ { public static class NorthwindDbCreator { + private static readonly DateTime KnownDate = new DateTime(2010, 06, 17); + public static void CreateMiscTestData(ISession session) { var roles = new[] @@ -30,7 +32,7 @@ var users = new[] { - new User("ayende", DateTime.Today) + new User("ayende", KnownDate) { Role = roles[0], InvalidLoginAttempts = 4, @@ -68,24 +70,24 @@ { new Timesheet { - SubmittedDate = DateTime.Today, + SubmittedDate = KnownDate, Submitted = true }, new Timesheet { - SubmittedDate = DateTime.Today.AddDays(-1), + SubmittedDate = KnownDate.AddDays(-1), Submitted = false, Entries = new List<TimesheetEntry> { new TimesheetEntry { - EntryDate = DateTime.Today, + EntryDate = KnownDate, NumberOfHours = 6, Comments = "testing 123" }, new TimesheetEntry { - EntryDate = DateTime.Today.AddDays(1), + EntryDate = KnownDate.AddDays(1), NumberOfHours = 14 } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-18 05:20:40
|
Revision: 4991 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4991&view=rev Author: fabiomaulo Date: 2010-06-18 05:20:34 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Fixed teamcity-hibernate.cfg.xml to use Sql2008 dialect Modified Paths: -------------- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml Modified: trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml =================================================================== --- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml 2010-06-18 04:54:01 UTC (rev 4990) +++ trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml 2010-06-18 05:20:34 UTC (rev 4991) @@ -18,7 +18,7 @@ <!-- 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="dialect">NHibernate.Dialect.MsSql2008Dialect</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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-18 04:54:08
|
Revision: 4990 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4990&view=rev Author: fabiomaulo Date: 2010-06-18 04:54:01 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Fix NH-1838 (Guid support in MySql dialect) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MySQL5Dialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MySQL5Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MySQL5Dialect.cs 2010-06-18 04:49:40 UTC (rev 4989) +++ trunk/nhibernate/src/NHibernate/Dialect/MySQL5Dialect.cs 2010-06-18 04:54:01 UTC (rev 4990) @@ -9,6 +9,7 @@ { RegisterColumnType(DbType.Decimal, "DECIMAL(19,5)"); RegisterColumnType(DbType.Decimal, 19, "DECIMAL($p, $s)"); + RegisterColumnType(DbType.Guid, "BINARY(16)"); } //Reference 5.x This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-18 04:49:47
|
Revision: 4989 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4989&view=rev Author: fabiomaulo Date: 2010-06-18 04:49:40 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Last NUnit2.5.5.10112 Added Paths: ----------- 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/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.png trunk/nhibernate/Tools/nunit/lib/Ignored.png trunk/nhibernate/Tools/nunit/lib/Inconclusive.png trunk/nhibernate/Tools/nunit/lib/Skipped.png trunk/nhibernate/Tools/nunit/lib/Success.png 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-x86.exe trunk/nhibernate/Tools/nunit/nunit-agent-x86.exe.config trunk/nhibernate/Tools/nunit/nunit-agent.exe trunk/nhibernate/Tools/nunit/nunit-agent.exe.config 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.exe trunk/nhibernate/Tools/nunit/nunit.exe.config trunk/nhibernate/Tools/nunit/nunit.framework.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 Added: trunk/nhibernate/Tools/nunit/NUnitFitTests.html =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitFitTests.html (rev 0) +++ trunk/nhibernate/Tools/nunit/NUnitFitTests.html 2010-06-18 04:49:40 UTC (rev 4989) @@ -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 2010-06-18 04:49:40 UTC (rev 4989) @@ -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 2010-06-18 04:49:40 UTC (rev 4989) @@ -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 2010-06-18 04:49:40 UTC (rev 4989) @@ -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 2010-06-18 04:49:40 UTC (rev 4989) @@ -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> 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 2010-06-18 04:49:40 UTC (rev 4989) @@ -0,0 +1,10113 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>nunit.framework</name> + </assembly> + <members> + <member name="T:NUnit.Framework.Constraints.BinaryConstraint"> + <summary> + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. + </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.BinaryConstraint.left"> + <summary> + The first constraint being combined + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.BinaryConstraint.right"> + <summary> + The second constraint being combined + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.BinaryConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Construct a BinaryConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="T:NUnit.Framework.Constraints.AndConstraint"> + <summary> + AndConstraint succeeds only if both members succeed. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an AndConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.Matches(System.Object)"> + <summary> + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. + </summary> + <param name="actual">The actual value</param> + <returns>True if the constraints both succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</param> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.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.OrConstraint"> + <summary> + OrConstraint succeeds if either member succeeds + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an OrConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.Matches(System.Object)"> + <summary> + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + </summary> + <param name="actual">The actual value</param> + <returns>True if either constraint succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</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 IComparer<T> and returns self. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Comparison{``0})"> + <summary> + Modifies the constraint to use a Comparison<T> and returns self. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.By(System.String)"> + <summary> + Modifies the constraint to test ordering by the value of + a specified property and returns self. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.doMatch(System.Collections.IEnumerable)"> + <summary> + Test whether the collection is ordered + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> + <summary> + Write a description of the constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.ToString"> + <summary> + Returns the string representation of the constraint. + </summary> + <returns></returns> + </member> + <member name="P:NUnit.Framework.Constraints.CollectionOrderedConstraint.Descending"> + <summary> + If used performs a reverse comparison + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.ComparisonConstraint"> + <summary> + Abstract base class for constraints that compare values to + determine if one is greater than, equal to or less than + the other. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.expected"> + <summary> + The value against which a comparison is to be made + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.ltOK"> + <summary> + If true, less than returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.eqOK"> + <summary> + if true, equal returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.gtOK"> + <summary> + if true, greater than returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.predicate"> + <summary> + The predicate used as a part of the description + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.comparer"> + <summary> + ComparisonAdapter to be used in making the comparison + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.#ctor(System.Object,System.Boolean,System.Boolean,System.Boolean,System.String)"> + <summary> + Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class. + </summary> + <param name="value">The value against which to make a comparison.</param> + <param name="ltOK">if set to <c>true</c> less succeeds.</param> + <param name="eqOK">if set to <c>true</c> equal succeeds.</param> + <param name="gtOK">if set to <c>true</c> greater succeeds.</param> + <param name="predicate">String used in describing the constraint.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.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.ComparisonConstraint.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.ComparisonConstraint.Using(System.Collections.IComparer)"> + <summary> + Modifies the constraint to use an IComparer and returns self + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> + <summary> + Modifies the constraint to use an IComparer<T> and returns self + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Comparison{``0})"> + <summary> + Modifies the constraint to use a Comparison<T> and returns self + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.GreaterThanConstraint"> + <summary> + Tests whether a value is greater than the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint"> + <summary> + Tests whether a value is greater than or equal to the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.LessThanConstraint"> + <summary> + Tests whether a value is less than the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.LessThanConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:LessThanConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.LessThanOrEqualConstraint"> + <summary> + Tests whether a value is less than or equal to the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.ActualValueDelegate"> + <summary> + Delegate used to delay evaluation of the actual value + to be used in evaluating a constraint + </summary> + </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.EmptyConstraint"> + <summary> + EmptyConstraint tests a whether a string or collection is empty, + postponing the decision about which test is applied until the + type of the actual argument is known. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EmptyConstraint.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.EmptyConstraint.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="T:NUnit.Framework.Constraints.EqualConstraint"> + <summary> + EqualConstraint is able to compare an actual value with the + expected value provided in its constructor. Two objects are + considered equal if both are null, or if both have the same + value. NUnit has special semantics for some object types. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.EqualConstraint.clipStrings"> + <summary> + If true, strings in error messages will be clipped + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.EqualConstraint.comparer"> + <summary> + NUnitEqualityComparer used to test equality. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.EqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Within(System.Object)"> + <summary> + Flag the constraint to use a tolerance when determining equality. + </summary> + <para... [truncated message content] |
From: <fab...@us...> - 2010-06-18 04:42:49
|
Revision: 4988 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4988&view=rev Author: fabiomaulo Date: 2010-06-18 04:42:40 +0000 (Fri, 18 Jun 2010) Log Message: ----------- delete old version of NUnit Removed Paths: ------------- trunk/nhibernate/Tools/nunit/NUnitFitTests.html trunk/nhibernate/Tools/nunit/NUnitTests.config trunk/nhibernate/Tools/nunit/NUnitTests.nunit trunk/nhibernate/Tools/nunit/addins/ 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/launcher.log.conf trunk/nhibernate/Tools/nunit/lib/ 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 Deleted: trunk/nhibernate/Tools/nunit/NUnitFitTests.html =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitFitTests.html 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/NUnitFitTests.html 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,277 +0,0 @@ -<!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> Deleted: trunk/nhibernate/Tools/nunit/NUnitTests.config =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitTests.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/NUnitTests.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,84 +0,0 @@ -<?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> Deleted: trunk/nhibernate/Tools/nunit/NUnitTests.nunit =================================================================== --- trunk/nhibernate/Tools/nunit/NUnitTests.nunit 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/NUnitTests.nunit 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,14 +0,0 @@ -<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> Deleted: trunk/nhibernate/Tools/nunit/agent.conf =================================================================== --- trunk/nhibernate/Tools/nunit/agent.conf 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/agent.conf 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,4 +0,0 @@ -<AgentConfig> - <Port>8080</Port> - <PathToAssemblies>.</PathToAssemblies> -</AgentConfig> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/agent.log.conf =================================================================== --- trunk/nhibernate/Tools/nunit/agent.log.conf 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/agent.log.conf 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,18 +0,0 @@ -<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> Deleted: trunk/nhibernate/Tools/nunit/clr.bat =================================================================== --- trunk/nhibernate/Tools/nunit/clr.bat 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/clr.bat 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,96 +0,0 @@ -@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 Deleted: trunk/nhibernate/Tools/nunit/launcher.log.conf =================================================================== --- trunk/nhibernate/Tools/nunit/launcher.log.conf 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/launcher.log.conf 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,18 +0,0 @@ -<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> Deleted: trunk/nhibernate/Tools/nunit/nunit-agent.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit-agent.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/nunit-agent.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/nunit-agent.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for nunit-agent.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="lib;addins"/> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/nunit-console-runner.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit-console-x86.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit-console-x86.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/nunit-console-x86.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/nunit-console-x86.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for NUnit-console.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="lib;addins"/> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/nunit-console.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit-console.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/nunit-console.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/nunit-console.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for NUnit-console.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="lib;addins"/> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/nunit-x86.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit-x86.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/nunit-x86.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/nunit-x86.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for NUnit-gui.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - <!-- - Uncomment to specify the url to be used for help. If not used, the - default value is something like - file://localhost/C:/Program Files/NUnit 2.2/doc/index.html - This setting is provided in case your default browser doesn't - support this format. - --> - <!-- <add key="helpUrl" value="http://www.nunit.org" /> --> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="lib;addins" /> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/nunit.core.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit.core.interfaces.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/nunit.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/nunit.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for NUnit-gui.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - <!-- - Uncomment to specify the url to be used for help. If not used, the - default value is something like - file://localhost/C:/Program Files/NUnit 2.2/doc/index.html - This setting is provided in case your default browser doesn't - support this format. - --> - <!-- <add key="helpUrl" value="http://www.nunit.org" /> --> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="lib;addins" /> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/nunit.framework.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/nunit.util.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/pnunit-agent.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/pnunit-agent.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/pnunit-agent.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/pnunit-agent.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for pnunit-agent.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="framework;lib;addins"/> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/pnunit-launcher.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/pnunit-launcher.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/pnunit-launcher.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/pnunit-launcher.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<configuration> - <!-- - Application settings for pnunit-launch.exe. Do NOT put settings - for use by your tests here. - --> - <appSettings> - <!-- - Specify the location to be used by .NET for the cache - --> - <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> - </appSettings> - - <!-- Set the level for tracing NUnit itself --> - <!-- 0=Off 1=Error 2=Warning 3=Info 4=Debug --> - <system.diagnostics> - <switches> - <add name="NTrace" value="0" /> - </switches> - </system.diagnostics> - - <runtime> - <!-- We need this so test exceptions don't crash NUnit --> - <legacyUnhandledExceptionPolicy enabled="1" /> - - <!-- Look for addins in the addins directory for now --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <probing privatePath="framework;lib;addins"/> - </assemblyBinding> - - <!-- - The following <assemblyBinding> section allows running nunit under - .NET 1.0 by redirecting assemblies. The appliesTo attribute - causes the section to be ignored except under .NET 1.0 - on a machine with only the .NET version 1.0 runtime installed. - If application and its tests were built for .NET 1.1 you will - also need to redirect system assemblies in the test config file, - which controls loading of the tests. - --> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" - appliesTo="v1.0.3705"> - - <dependentAssembly> - <assemblyIdentity name="System" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Data" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Drawing" - publicKeyToken="b03f5f7f11d50a3a" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Windows.Forms" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - <dependentAssembly> - <assemblyIdentity name="System.Xml" - publicKeyToken="b77a5c561934e089" - culture="neutral"/> - <bindingRedirect oldVersion="1.0.5000.0" - newVersion="1.0.3300.0"/> - </dependentAssembly> - - </assemblyBinding> - - </runtime> - -</configuration> \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/pnunit.framework.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/pnunit.tests.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/runFile.exe =================================================================== (Binary files differ) Deleted: trunk/nhibernate/Tools/nunit/runFile.exe.config =================================================================== --- trunk/nhibernate/Tools/nunit/runFile.exe.config 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/runFile.exe.config 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<configuration> - <startup> - <supportedRuntime version="v2.0.50727" /> - <supportedRuntime version="v2.0.50215" /> - <supportedRuntime version="v2.0.40607" /> - <supportedRuntime version="v1.1.4322" /> - <supportedRuntime version="v1.0.3705" /> - - <requiredRuntime version="v1.0.3705" /> - </startup> - -<!-- - 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> Deleted: trunk/nhibernate/Tools/nunit/runpnunit.bat =================================================================== --- trunk/nhibernate/Tools/nunit/runpnunit.bat 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/runpnunit.bat 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,2 +0,0 @@ -start pnunit-agent agent.conf -pnunit-launcher test.conf \ No newline at end of file Deleted: trunk/nhibernate/Tools/nunit/test.conf =================================================================== --- trunk/nhibernate/Tools/nunit/test.conf 2010-06-18 04:36:06 UTC (rev 4987) +++ trunk/nhibernate/Tools/nunit/test.conf 2010-06-18 04:42:40 UTC (rev 4988) @@ -1,24 +0,0 @@ -<TestGroup> - <ParallelTests> - - <ParallelTest> - <Name>Testing</Name> - <Tests> - <TestConf> - <Name>Testing</Name> - <Assembly>pnunit.tests.dll</Assembly> - <TestToRun>TestLibraries.Testing.EqualTo19</TestToRun> - <Machine>localhost:8080</Machine> - <TestParams> - <string>..\server</string> <!-- server dir --> - <string></string> <!-- database server --> - <string></string><!-- conn string --> - </TestParams> - </TestConf> - - </Tests> - </ParallelTest> - - - </ParallelTests> -</TestGroup> \ 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: <fab...@us...> - 2010-06-18 04:36:12
|
Revision: 4987 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4987&view=rev Author: fabiomaulo Date: 2010-06-18 04:36:06 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Minor (ignore list) Property Changed: ---------------- trunk/nhibernate/doc/reference/images/ Property changes on: trunk/nhibernate/doc/reference/images ___________________________________________________________________ Added: svn:ignore + Thumbs.db This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-06-18 04:33:12
|
Revision: 4986 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4986&view=rev Author: fabiomaulo Date: 2010-06-18 04:33:05 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Refactoring of Linq readonly tests (overboost) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/App.config trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs trunk/nhibernate/src/NHibernate.Test/Linq/ProjectionsTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs trunk/nhibernate/src/NHibernate.Test/Linq/SelectionTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/DbScripts/ trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs Modified: trunk/nhibernate/src/NHibernate.Test/App.config =================================================================== --- trunk/nhibernate/src/NHibernate.Test/App.config 2010-05-29 19:25:32 UTC (rev 4985) +++ trunk/nhibernate/src/NHibernate.Test/App.config 2010-06-18 04:33:05 UTC (rev 4986) @@ -61,7 +61,7 @@ <!-- 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="dialect">NHibernate.Dialect.MsSql2008Dialect</property> <property name="connection.connection_string">Server=localhost\sqlexpress;initial catalog=nhibernate;Integrated Security=SSPI</property> <property name="show_sql">false</property> Added: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs 2010-06-18 04:33:05 UTC (rev 4986) @@ -0,0 +1,139 @@ +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Reflection; +using NHibernate.Cfg; +using NHibernate.Connection; +using NHibernate.Tool.hbm2ddl; +using NUnit.Framework; + +namespace NHibernate.Test.Linq +{ + [SetUpFixture] + public class LinqReadonlyTestsContext + { + private IEnumerable<string> Mappings + { + get + { + return new[] + { + "Linq.Mappings.Customer.hbm.xml", + "Linq.Mappings.Employee.hbm.xml", + "Linq.Mappings.Order.hbm.xml", + "Linq.Mappings.OrderLine.hbm.xml", + "Linq.Mappings.Product.hbm.xml", + "Linq.Mappings.ProductCategory.hbm.xml", + "Linq.Mappings.Region.hbm.xml", + "Linq.Mappings.Shipper.hbm.xml", + "Linq.Mappings.Supplier.hbm.xml", + "Linq.Mappings.Territory.hbm.xml", + "Linq.Mappings.AnotherEntity.hbm.xml", + "Linq.Mappings.Role.hbm.xml", + "Linq.Mappings.User.hbm.xml", + "Linq.Mappings.TimeSheet.hbm.xml", + "Linq.Mappings.Animal.hbm.xml", + "Linq.Mappings.Patient.hbm.xml" + }; + } + } + + [SetUp] + public void CreateNorthwindDb() + { + Configuration configuration = Configure(); + string scripFileName = GetScripFileName(configuration, "LinqReadonlyCreateScript"); + if (File.Exists(scripFileName)) + { + ExecuteScriptFile(configuration, scripFileName); + } + else + { + // may crash with NUnit2.5+ test runner + new SchemaExport(configuration).Create(false, true); + ISessionFactory sessionFactory = configuration.BuildSessionFactory(); + CreateTestData(sessionFactory); + } + } + + private void ExecuteScriptFile(Configuration configuration, string scripFileName) + { + var file = new FileInfo(scripFileName); + string script = file.OpenText().ReadToEnd().Replace("GO", ""); + var connectionProvider = ConnectionProviderFactory.NewConnectionProvider(configuration.Properties); + using (var conn = connectionProvider.GetConnection()) + { + if (conn.State == ConnectionState.Closed) + { + conn.Open(); + } + using (var command = conn.CreateCommand()) + { + command.CommandText = script; + command.ExecuteNonQuery(); + } + } + } + + [TearDown] + public void DestroyNorthwindDb() + { + Configuration configuration = Configure(); + string scripFileName = GetScripFileName(configuration, "LinqReadonlyDropScript"); + if (File.Exists(scripFileName)) + { + ExecuteScriptFile(configuration, scripFileName); + } + else + { + new SchemaExport(configuration).Drop(false, true); + } + } + + private string GetScripFileName(Configuration configuration,string postFix) + { + var dialect = Dialect.Dialect.GetDialect(configuration.Properties); + return Path.Combine("DbScripts", dialect.GetType().Name + postFix + ".sql"); + } + + private Configuration Configure() + { + var configuration = new Configuration(); + if (TestConfigurationHelper.hibernateConfigFile != null) + configuration.Configure(TestConfigurationHelper.hibernateConfigFile); + + configuration.SetProperty(Environment.ConnectionProvider, typeof (DriverConnectionProvider).AssemblyQualifiedName); + + string assemblyName = "NHibernate.Test"; + Assembly assembly = Assembly.Load(assemblyName); + + foreach (string file in Mappings.Select(mf => assemblyName + "." + mf)) + { + configuration.AddResource(file, assembly); + } + + return configuration; + } + + private void CreateTestData(ISessionFactory sessionFactory) + { + using (IStatelessSession session = sessionFactory.OpenStatelessSession()) + using (ITransaction tx = session.BeginTransaction()) + { + NorthwindDbCreator.CreateNorthwindData(session); + + tx.Commit(); + } + + using (ISession session = sessionFactory.OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + NorthwindDbCreator.CreateMiscTestData(session); + NorthwindDbCreator.CreatePatientData(session); + tx.Commit(); + } + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2010-05-29 19:25:32 UTC (rev 4985) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2010-06-18 04:33:05 UTC (rev 4986) @@ -1,3572 +1,73 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; using NHibernate.Test.Linq.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq { - public class LinqTestCase : ReadonlyTestCase - { - private Northwind _northwind; - private ISession _session; + public class LinqTestCase : ReadonlyTestCase + { + private Northwind _northwind; + private ISession _session; - protected override bool PerformDbDataSetup - { - get { return true; } - } + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } - protected override bool PerformDbDataTeardown - { - get { return true; } - } + protected override IList Mappings + { + get + { + return new[] + { + "Linq.Mappings.Customer.hbm.xml", + "Linq.Mappings.Employee.hbm.xml", + "Linq.Mappings.Order.hbm.xml", + "Linq.Mappings.OrderLine.hbm.xml", + "Linq.Mappings.Product.hbm.xml", + "Linq.Mappings.ProductCategory.hbm.xml", + "Linq.Mappings.Region.hbm.xml", + "Linq.Mappings.Shipper.hbm.xml", + "Linq.Mappings.Supplier.hbm.xml", + "Linq.Mappings.Territory.hbm.xml", + "Linq.Mappings.AnotherEntity.hbm.xml", + "Linq.Mappings.Role.hbm.xml", + "Linq.Mappings.User.hbm.xml", + "Linq.Mappings.TimeSheet.hbm.xml", + "Linq.Mappings.Animal.hbm.xml", + "Linq.Mappings.Patient.hbm.xml" + }; + } + } - protected override string MappingsAssembly - { - get { return "NHibernate.Test"; } - } + protected Northwind db + { + get { return _northwind; } + } - protected override IList Mappings - { - get - { - return new[] - { - "Linq.Mappings.Customer.hbm.xml", - "Linq.Mappings.Employee.hbm.xml", - "Linq.Mappings.Order.hbm.xml", - "Linq.Mappings.OrderLine.hbm.xml", - "Linq.Mappings.Product.hbm.xml", - "Linq.Mappings.ProductCategory.hbm.xml", - "Linq.Mappings.Region.hbm.xml", - "Linq.Mappings.Shipper.hbm.xml", - "Linq.Mappings.Supplier.hbm.xml", - "Linq.Mappings.Territory.hbm.xml", - "Linq.Mappings.AnotherEntity.hbm.xml", - "Linq.Mappings.Role.hbm.xml", - "Linq.Mappings.User.hbm.xml", - "Linq.Mappings.TimeSheet.hbm.xml", - "Linq.Mappings.Animal.hbm.xml", - "Linq.Mappings.Patient.hbm.xml" + protected ISession session + { + get { return _session; } + } - }; - } - } + protected override void OnSetUp() + { + base.OnSetUp(); - private void CreateTestData() - { - using (IStatelessSession session = _sessions.OpenStatelessSession()) - using (ITransaction tx = session.BeginTransaction()) - { - CreateNorthwindData(session); + _session = OpenSession(); + _northwind = new Northwind(_session); + } - tx.Commit(); - } - - using (ISession session = _sessions.OpenSession()) - using (ITransaction tx = session.BeginTransaction()) - { - CreateMiscTestData(session); - CreatePatientData(session); - tx.Commit(); - } - } - - private void CreateMiscTestData(ISession session) - { - var roles = new[] - { - new Role() - { - Name = "Admin", - IsActive = true, - Entity = new AnotherEntity() - { - Output = "this is output..." - } - }, - new Role() - { - Name = "User", - IsActive = false - } - }; - - var users = new[] - { - new User("ayende", DateTime.Today) - { - Role = roles[0], - InvalidLoginAttempts = 4, - Enum1 = EnumStoredAsString.Medium, - Enum2 = EnumStoredAsInt32.High, - Component = new UserComponent() - { - Property1 = "test1", - Property2 = "test2", - OtherComponent = new UserComponent2() - { - OtherProperty1 = "othertest1" - } - } - }, - new User("rahien", new DateTime(1998, 12, 31)) - { - Role = roles[1], - InvalidLoginAttempts = 5, - Enum1 = EnumStoredAsString.Small, - Component = new UserComponent() - { - Property2 = "test2" - } - }, - new User("nhibernate", new DateTime(2000, 1, 1)) - { - InvalidLoginAttempts = 6, - LastLoginDate = DateTime.Now.AddDays(-1), - Enum1 = EnumStoredAsString.Medium - } - }; - - var timesheets = new[] - { - new Timesheet - { - SubmittedDate = DateTime.Today, - Submitted = true - }, - new Timesheet - { - SubmittedDate = DateTime.Today.AddDays(-1), - Submitted = false, - Entries = new List<TimesheetEntry> - { - new TimesheetEntry - { - EntryDate = DateTime.Today, - NumberOfHours = 6, - Comments = "testing 123" - }, - new TimesheetEntry - { - EntryDate = DateTime.Today.AddDays(1), - NumberOfHours = 14 - } - } - }, - new Timesheet - { - SubmittedDate = DateTime.Now.AddDays(1), - Submitted = true, - Entries = new List<TimesheetEntry> - { - new TimesheetEntry - { - EntryDate = DateTime.Now.AddMinutes(20), - NumberOfHours = 4 - }, - new TimesheetEntry - { - EntryDate = DateTime.Now.AddMinutes(10), - NumberOfHours = 8, - Comments = "testing 456" - }, - new TimesheetEntry - { - EntryDate = DateTime.Now.AddMinutes(13), - NumberOfHours = 7 - }, - new TimesheetEntry - { - EntryDate = DateTime.Now.AddMinutes(45), - NumberOfHours = 38 - } - } - } - }; - - ((IList<User>)timesheets[0].Users).Add(users[0]); - ((IList<User>)timesheets[1].Users).Add(users[0]); - ((IList<User>)timesheets[0].Users).Add(users[1]); - - var animals = new Animal[] + protected override void OnTearDown() + { + if (_session.IsOpen) { - new Animal() { SerialNumber = "123", BodyWeight = 100 }, - new Lizard() { SerialNumber = "789", BodyWeight = 40, BodyTemperature = 14 }, - new Lizard() { SerialNumber = "1234", BodyWeight = 30, BodyTemperature = 18 }, - new Dog() { SerialNumber = "5678", BodyWeight = 156, BirthDate = new DateTime(1980, 07, 11) }, - new Dog() { SerialNumber = "9101", BodyWeight = 205, BirthDate = new DateTime(1980, 12, 13) }, - new Cat() { SerialNumber = "1121", BodyWeight = 115, Pregnant = true } - }; + _session.Close(); + } + } - animals[0].Children = new[] { animals[3], animals[4] }.ToList(); - animals[5].Father = animals[3]; - animals[5].Mother = animals[4]; - - animals[1].Children = new[] { animals[5] }.ToList(); - - foreach (Role role in roles) - session.Save(role); - - foreach (User user in users) - session.Save(user); - - foreach (Timesheet timesheet in timesheets) - session.Save(timesheet); - - foreach (Animal animal in animals) - session.Save(animal); - } - - private void CreatePatientData(ISession session) - { - State newYork = new State - { - Abbreviation = "NY", - FullName = "New York" - }; - State florida = new State - { - Abbreviation = "FL", - FullName = "Florida" - }; - - Physician drDobbs = new Physician - { - Name = "Dr Dobbs" - }; - Physician drWatson = new Physician - { - Name = "Dr Watson" - }; - - PatientRecord bobBarkerRecord = new PatientRecord - { - Name = new PatientName - { - FirstName = "Bob", - LastName = "Barker" - }, - Address = new PatientAddress - { - AddressLine1 = "123 Main St", - City = "New York", - State = newYork, - ZipCode = "10001" - }, - BirthDate = new DateTime(1930, 1, 1), - Gender = Gender.Male - }; - - PatientRecord johnDoeRecord1 = new PatientRecord - { - Name = new PatientName - { - FirstName = "John", - LastName = "Doe" - }, - Address = new PatientAddress - { - AddressLine1 = "123 Main St", - City = "Tampa", - State = florida, - ZipCode = "33602" - }, - BirthDate = new DateTime(1969, 1, 1), - Gender = Gender.Male - }; - - PatientRecord johnDoeRecord2 = new PatientRecord - { - Name = new PatientName - { - FirstName = "John", - LastName = "Doe" - }, - Address = new PatientAddress - { - AddressLine1 = "123 Main St", - AddressLine2 = "Apt 2", - City = "Tampa", - State = florida, - ZipCode = "33602" - }, - BirthDate = new DateTime(1969, 1, 1) - }; - - Patient bobBarker = new Patient(new[] { bobBarkerRecord }, false, drDobbs); - Patient johnDoe = new Patient(new[] { johnDoeRecord1, johnDoeRecord2 }, true, drWatson); - - session.Save(newYork); - session.Save(florida); - session.Save(drDobbs); - session.Save(drWatson); - session.Save(bobBarker); - session.Save(johnDoe); - } - - private void CreateNorthwindData(IStatelessSession session) - { - var shippers = new List<Shipper>(); - var shipper = new Shipper { ShipperId = 1, CompanyName = "Speedy Express", PhoneNumber = "(503) 555-9831", Reference = new Guid("356E4A7E-B027-4321-BA40-E2677E6502CF") }; session.Insert(shipper); shippers.Add(shipper); - shipper = new Shipper { ShipperId = 2, CompanyName = "United Package", PhoneNumber = "(503) 555-3199", Reference = new Guid("6DFCD0D7-4D2E-4525-A502-3EA9AA52E965") }; session.Insert(shipper); shippers.Add(shipper); - shipper = new Shipper { ShipperId = 3, CompanyName = "Federal Shipping", PhoneNumber = "(503) 555-9931", Reference = new Guid("716F114B-E253-4166-8C76-46E6F340B58F") }; session.Insert(shipper); shippers.Add(shipper); - - var categories = new List<ProductCategory>(); - var category = new ProductCategory { CategoryId = 1, Name = "Beverages", Description = "Soft drinks, coffees, teas, beers, and ales" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 2, Name = "Condiments", Description = "Sweet and savory sauces, relishes, spreads, and seasonings" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 3, Name = "Confections", Description = "Desserts, candies, and sweet breads" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 4, Name = "Dairy Products", Description = "Cheeses" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 5, Name = "Grains/Cereals", Description = "Breads, crackers, pasta, and cereal" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 6, Name = "Meat/Poultry", Description = "Prepared meats" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 7, Name = "Produce", Description = "Dried fruit and bean curd" }; session.Insert(category); categories.Add(category); - category = new ProductCategory { CategoryId = 8, Name = "Seafood", Description = "Seaweed and fish" }; session.Insert(category); categories.Add(category); - - var suppliers = new List<Supplier>(); - var supplier = new Supplier { SupplierId = 1, CompanyName = "Exotic Liquids", ContactName = "Charlotte Cooper", ContactTitle = "Purchasing Manager", HomePage = "", Address = new Address("49 Gilbert St.", "London", "", "EC1 4SD", "UK", "(171) 555-2222", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 2, CompanyName = "New Orleans Cajun Delights", ContactName = "Shelley Burke", ContactTitle = "Order Administrator", HomePage = "#CAJUN.HTM#", Address = new Address("P.O. Box 78934", "New Orleans", "LA", "70117", "USA", "(100) 555-4822", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 3, CompanyName = "Grandma Kelly's Homestead", ContactName = "Regina Murphy", ContactTitle = "Sales Representative", HomePage = "", Address = new Address("707 Oxford Rd.", "Ann Arbor", "MI", "48104", "USA", "(313) 555-5735", "(313) 555-3349") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 4, CompanyName = "Tokyo Traders", ContactName = "Yoshi Nagase", ContactTitle = "Marketing Manager", HomePage = "", Address = new Address("9-8 Sekimai Musashino-shi", "Tokyo", "", "100", "Japan", "(03) 3555-5011", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 5, CompanyName = "Cooperativa de Quesos 'Las Cabras'", ContactName = "Antonio del Valle Saavedra", ContactTitle = "Export Administrator", HomePage = "", Address = new Address("Calle del Rosal 4", "Oviedo", "Asturias", "33007", "Spain", "(98) 598 76 54", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 6, CompanyName = "Mayumi's", ContactName = "Mayumi Ohno", ContactTitle = "Marketing Representative", HomePage = "Mayumi's (on the World Wide Web)#http://www.microsoft.com/accessdev/sampleapps/mayumi.htm#", Address = new Address("92 Setsuko Chuo-ku", "Osaka", "", "545", "Japan", "(06) 431-7877", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 7, CompanyName = "Pavlova, Ltd.", ContactName = "Ian Devling", ContactTitle = "Marketing Manager", HomePage = "", Address = new Address("74 Rose St. Moonie Ponds", "Melbourne", "Victoria", "3058", "Australia", "(03) 444-2343", "(03) 444-6588") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 8, CompanyName = "Specialty Biscuits, Ltd.", ContactName = "Peter Wilson", ContactTitle = "Sales Representative", HomePage = "", Address = new Address("29 King's Way", "Manchester", "", "M14 GSD", "UK", "(161) 555-4448", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 9, CompanyName = "PB Knäckebröd AB", ContactName = "Lars Peterson", ContactTitle = "Sales Agent", HomePage = "", Address = new Address("Kaloadagatan 13", "Göteborg", "", "S-345 67", "Sweden", "031-987 65 43", "031-987 65 91") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 10, CompanyName = "Refrescos Americanas LTDA", ContactName = "Carlos Diaz", ContactTitle = "Marketing Manager", HomePage = "", Address = new Address("Av. das Americanas 12.890", "Sao Paulo", "", "5442", "Brazil", "(11) 555 4640", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 11, CompanyName = "Heli Süßwaren GmbH & Co. KG", ContactName = "Petra Winkler", ContactTitle = "Sales Manager", HomePage = "", Address = new Address("Tiergartenstraße 5", "Berlin", "", "10785", "Germany", "(010) 9984510", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 12, CompanyName = "Plutzer Lebensmittelgroßmärkte AG", ContactName = "Martin Bein", ContactTitle = "International Marketing Mgr.", HomePage = "Plutzer (on the World Wide Web)#http://www.microsoft.com/accessdev/sampleapps/plutzer.htm#", Address = new Address("Bogenallee 51", "Frankfurt", "", "60439", "Germany", "(069) 992755", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 13, CompanyName = "Nord-Ost-Fisch Handelsgesellschaft mbH", ContactName = "Sven Petersen", ContactTitle = "Coordinator Foreign Markets", HomePage = "", Address = new Address("Frahmredder 112a", "Cuxhaven", "", "27478", "Germany", "(04721) 8713", "(04721) 8714") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 14, CompanyName = "Formaggi Fortini s.r.l.", ContactName = "Elio Rossi", ContactTitle = "Sales Representative", HomePage = "#FORMAGGI.HTM#", Address = new Address("Viale Dante, 75", "Ravenna", "", "48100", "Italy", "(0544) 60323", "(0544) 60603") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 15, CompanyName = "Norske Meierier", ContactName = "Beate Vileid", ContactTitle = "Marketing Manager", HomePage = "", Address = new Address("Hatlevegen 5", "Sandvika", "", "1320", "Norway", "(0)2-953010", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 16, CompanyName = "Bigfoot Breweries", ContactName = "Cheryl Saylor", ContactTitle = "Regional Account Rep.", HomePage = "", Address = new Address("3400 - 8th Avenue Suite 210", "Bend", "OR", "97101", "USA", "(503) 555-9931", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 17, CompanyName = "Svensk Sjöföda AB", ContactName = "Michael Björn", ContactTitle = "Sales Representative", HomePage = "", Address = new Address("Brovallavägen 231", "Stockholm", "", "S-123 45", "Sweden", "08-123 45 67", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 18, CompanyName = "Aux joyeux ecclésiastiques", ContactName = "Guylène Nodier", ContactTitle = "Sales Manager", HomePage = "", Address = new Address("203, Rue des Francs-Bourgeois", "Paris", "", "75004", "France", "(1) 03.83.00.68", "(1) 03.83.00.62") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 19, CompanyName = "New England Seafood Cannery", ContactName = "Robb Merchant", ContactTitle = "Wholesale Account Agent", HomePage = "", Address = new Address("Order Processing Dept. 2100 Paul Revere Blvd.", "Boston", "MA", "02134", "USA", "(617) 555-3267", "(617) 555-3389") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 20, CompanyName = "Leka Trading", ContactName = "Chandra Leka", ContactTitle = "Owner", HomePage = "", Address = new Address("471 Serangoon Loop, Suite #402", "Singapore", "", "0512", "Singapore", "555-8787", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 21, CompanyName = "Lyngbysild", ContactName = "Niels Petersen", ContactTitle = "Sales Manager", HomePage = "", Address = new Address("Lyngbysild Fiskebakken 10", "Lyngby", "", "2800", "Denmark", "43844108", "43844115") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 22, CompanyName = "Zaanse Snoepfabriek", ContactName = "Dirk Luchte", ContactTitle = "Accounting Manager", HomePage = "", Address = new Address("Verkoop Rijnweg 22", "Zaandam", "", "9999 ZZ", "Netherlands", "(12345) 1212", "(12345) 1210") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 23, CompanyName = "Karkki Oy", ContactName = "Anne Heikkonen", ContactTitle = "Product Manager", HomePage = "", Address = new Address("Valtakatu 12", "Lappeenranta", "", "53120", "Finland", "(953) 10956", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 24, CompanyName = "G'day, Mate", ContactName = "Wendy Mackenzie", ContactTitle = "Sales Representative", HomePage = "G'day Mate (on the World Wide Web)#http://www.microsoft.com/accessdev/sampleapps/gdaymate.htm#", Address = new Address("170 Prince Edward Parade Hunter's Hill", "Sydney", "NSW", "2042", "Australia", "(02) 555-5914", "(02) 555-4873") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 25, CompanyName = "Ma Maison", ContactName = "Jean-Guy Lauzon", ContactTitle = "Marketing Manager", HomePage = "", Address = new Address("2960 Rue St. Laurent", "Montréal", "Québec", "H1J 1C3", "Canada", "(514) 555-9022", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 26, CompanyName = "Pasta Buttini s.r.l.", ContactName = "Giovanni Giudici", ContactTitle = "Order Administrator", HomePage = "", Address = new Address("Via dei Gelsomini, 153", "Salerno", "", "84100", "Italy", "(089) 6547665", "(089) 6547667") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 27, CompanyName = "Escargots Nouveaux", ContactName = "Marie Delamare", ContactTitle = "Sales Manager", HomePage = "", Address = new Address("22, rue H. Voiron", "Montceau", "", "71300", "France", "85.57.00.07", "") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 28, CompanyName = "Gai pâturage", ContactName = "Eliane Noz", ContactTitle = "Sales Representative", HomePage = "", Address = new Address("Bat. B 3, rue des Alpes", "Annecy", "", "74000", "France", "38.76.98.06", "38.76.98.58") }; session.Insert(supplier); suppliers.Add(supplier); - supplier = new Supplier { SupplierId = 29, CompanyName = "Forêts d'érables", ContactName = "Chantal Goulet", ContactTitle = "Accounting Manager", HomePage = "", Address = new Address("148 rue Chasseur", "Ste-Hyacinthe", "Québec", "J2S 7S8", "Canada", "(514) 555-2955", "(514) 555-2921") }; session.Insert(supplier); suppliers.Add(supplier); - - var employees = new List<Employee>(); - var employee = new Employee { EmployeeId = 1, LastName = "Davolio", FirstName = "Nancy", Title = "Sales Representative", TitleOfCourtesy = "Ms.", BirthDate = DateTime.Parse("Dec 8 1948 12:00AM"), HireDate = DateTime.Parse("May 1 1992 12:00AM"), Address = new Address("507 - 20th Ave. E.Apt. 2A", "Seattle", "WA", "98122", "USA", "(206) 555-9857", null), Extension = "5467", Notes = "Education includes a BA in psychology from Colorado State University in 1970. She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 2, LastName = "Fuller", FirstName = "Andrew", Title = "Vice President, Sales", TitleOfCourtesy = "Dr.", BirthDate = DateTime.Parse("Feb 19 1952 12:00AM"), HireDate = DateTime.Parse("Aug 14 1992 12:00AM"), Address = new Address("908 W. Capital Way", "Tacoma", "WA", "98401", "USA", "(206) 555-9482", null), Extension = "3457", Notes = "Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 3, LastName = "Leverling", FirstName = "Janet", Title = "Sales Representative", TitleOfCourtesy = "Ms.", BirthDate = DateTime.Parse("Aug 30 1963 12:00AM"), HireDate = DateTime.Parse("Apr 1 1992 12:00AM"), Address = new Address("722 Moss Bay Blvd.", "Kirkland", "WA", "98033", "USA", "(206) 555-3412", null), Extension = "3355", Notes = "Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 4, LastName = "Peacock", FirstName = "Margaret", Title = "Sales Representative", TitleOfCourtesy = "Mrs.", BirthDate = DateTime.Parse("Sep 19 1937 12:00AM"), HireDate = DateTime.Parse("May 3 1993 12:00AM"), Address = new Address("4110 Old Redmond Rd.", "Redmond", "WA", "98052", "USA", "(206) 555-8122", null), Extension = "5176", Notes = "Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 5, LastName = "Buchanan", FirstName = "Steven", Title = "Sales Manager", TitleOfCourtesy = "Mr.", BirthDate = DateTime.Parse("Mar 4 1955 12:00AM"), HireDate = DateTime.Parse("Oct 17 1993 12:00AM"), Address = new Address("14 Garrett Hill", "London", "", "SW1 8JR", "UK", "(71) 555-4848", null), Extension = "3453", Notes = "Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses 'Successful Telemarketing' and 'International Sales Management.' He is fluent in French." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 6, LastName = "Suyama", FirstName = "Michael", Title = "Sales Representative", TitleOfCourtesy = "Mr.", BirthDate = DateTime.Parse("Jul 2 1963 12:00AM"), HireDate = DateTime.Parse("Oct 17 1993 12:00AM"), Address = new Address("Coventry HouseMiner Rd.", "London", "", "EC2 7JR", "UK", "(71) 555-7773", null), Extension = "428", Notes = "Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses 'Multi-Cultural Selling' and 'Time Management for the Sales Professional.' He is fluent in Japanese and can read and write French, Portuguese, and Spanish." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 7, LastName = "King", FirstName = "Robert", Title = "Sales Representative", TitleOfCourtesy = "Mr.", BirthDate = DateTime.Parse("May 29 1960 12:00AM"), HireDate = DateTime.Parse("Jan 2 1994 12:00AM"), Address = new Address("Edgeham HollowWinchester Way", "London", "", "RG1 9SP", "UK", "(71) 555-5598", null), Extension = "465", Notes = "Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled 'Selling in Europe,' he was transferred to the London office in March 1993." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 8, LastName = "Callahan", FirstName = "Laura", Title = "Inside Sales Coordinator", TitleOfCourtesy = "Ms.", BirthDate = DateTime.Parse("Jan 9 1958 12:00AM"), HireDate = DateTime.Parse("Mar 5 1994 12:00AM"), Address = new Address("4726 - 11th Ave. N.E.", "Seattle", "WA", "98105", "USA", "(206) 555-1189", null), Extension = "2344", Notes = "Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French." }; session.Insert(employee); employees.Add(employee); - employee = new Employee { EmployeeId = 9, LastName = "Dodsworth", FirstName = "Anne", Title = "Sales Representative", TitleOfCourtesy = "Ms.", BirthDate = DateTime.Parse("Jan 27 1966 12:00AM"), HireDate = DateTime.Parse("Nov 15 1994 12:00AM"), Address = new Address("7 Houndstooth Rd.", "London", "", "WG2 7LT", "UK", "(71) 555-4444", null), Extension = "452", Notes = "Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German." }; session.Insert(employee); employees.Add(employee); - - employees.Where(e => e.LastName == "Davolio").First().Superior = employees.Where(e => e.LastName == "Fuller").First(); - employees.Where(e => e.LastName == "Leverling").First().Superior = employees.Where(e => e.LastName == "Fuller").First(); - employees.Where(e => e.LastName == "Peacock").First().Superior = employees.Where(e => e.LastName == "Fuller").First(); - employees.Where(e => e.LastName == "Buchanan").First().Superior = employees.Where(e => e.LastName == "Fuller").First(); - employees.Where(e => e.LastName == "Suyama").First().Superior = employees.Where(e => e.LastName == "Buchanan").First(); - employees.Where(e => e.LastName == "King").First().Superior = employees.Where(e => e.LastName == "Buchanan").First(); - employees.Where(e => e.LastName == "Callahan").First().Superior = employees.Where(e => e.LastName == "Fuller").First(); - employees.Where(e => e.LastName == "Dodsworth").First().Superior = employees.Where(e => e.LastName == "Buchanan").First(); - - var customers = new List<Customer>(); - var customer = new Customer { CustomerId = "ALFKI", CompanyName = "Alfreds Futterkiste", ContactName = "Maria Anders", ContactTitle = "Sales Representative", Address = new Address("Obere Str. 57", "Berlin", "", "12209", "Germany", "030-0074321", "030-0076545") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "ANATR", CompanyName = "Ana Trujillo Emparedados y helados", ContactName = "Ana Trujillo", ContactTitle = "Owner", Address = new Address("Avda. de la Constitución 2222", "México D.F.", "", "05021", "Mexico", "(5) 555-4729", "(5) 555-3745") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "ANTON", CompanyName = "Antonio Moreno Taquería", ContactName = "Antonio Moreno", ContactTitle = "Owner", Address = new Address("Mataderos 2312", "México D.F.", "", "05023", "Mexico", "(5) 555-3932", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "AROUT", CompanyName = "Around the Horn", ContactName = "Thomas Hardy", ContactTitle = "Sales Representative", Address = new Address("120 Hanover Sq.", "London", "", "WA1 1DP", "UK", "(171) 555-7788", "(171) 555-6750") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BERGS", CompanyName = "Berglunds snabbköp", ContactName = "Christina Berglund", ContactTitle = "Order Administrator", Address = new Address("Berguvsvägen 8", "Luleå", "", "S-958 22", "Sweden", "0921-12 34 65", "0921-12 34 67") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BLAUS", CompanyName = "Blauer See Delikatessen", ContactName = "Hanna Moos", ContactTitle = "Sales Representative", Address = new Address("Forsterstr. 57", "Mannheim", "", "68306", "Germany", "0621-08460", "0621-08924") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BLONP", CompanyName = "Blondesddsl père et fils", ContactName = "Frédérique Citeaux", ContactTitle = "Marketing Manager", Address = new Address("24, place Kléber", "Strasbourg", "", "67000", "France", "88.60.15.31", "88.60.15.32") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BOLID", CompanyName = "Bólido Comidas preparadas", ContactName = "Martín Sommer", ContactTitle = "Owner", Address = new Address("C/ Araquil, 67", "Madrid", "", "28023", "Spain", "(91) 555 22 82", "(91) 555 91 99") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BONAP", CompanyName = "Bon app'", ContactName = "Laurence Lebihan", ContactTitle = "Owner", Address = new Address("12, rue des Bouchers", "Marseille", "", "13008", "France", "91.24.45.40", "91.24.45.41") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BOTTM", CompanyName = "Bottom-Dollar Markets", ContactName = "Elizabeth Lincoln", ContactTitle = "Accounting Manager", Address = new Address("23 Tsawassen Blvd.", "Tsawassen", "BC", "T2F 8M4", "Canada", "(604) 555-4729", "(604) 555-3745") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "BSBEV", CompanyName = "B's Beverages", ContactName = "Victoria Ashworth", ContactTitle = "Sales Representative", Address = new Address("Fauntleroy Circus", "London", "", "EC2 5NT", "UK", "(171) 555-1212", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "CACTU", CompanyName = "Cactus Comidas para llevar", ContactName = "Patricio Simpson", ContactTitle = "Sales Agent", Address = new Address("Cerrito 333", "Buenos Aires", "", "1010", "Argentina", "(1) 135-5555", "(1) 135-4892") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "CENTC", CompanyName = "Centro comercial Moctezuma", ContactName = "Francisco Chang", ContactTitle = "Marketing Manager", Address = new Address("Sierras de Granada 9993", "México D.F.", "", "05022", "Mexico", "(5) 555-3392", "(5) 555-7293") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "CHOPS", CompanyName = "Chop-suey Chinese", ContactName = "Yang Wang", ContactTitle = "Owner", Address = new Address("Hauptstr. 29", "Bern", "", "3012", "Switzerland", "0452-076545", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "COMMI", CompanyName = "Comércio Mineiro", ContactName = "Pedro Afonso", ContactTitle = "Sales Associate", Address = new Address("Av. dos Lusíadas, 23", "Sao Paulo", "SP", "05432-043", "Brazil", "(11) 555-7647", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "CONSH", CompanyName = "Consolidated Holdings", ContactName = "Elizabeth Brown", ContactTitle = "Sales Representative", Address = new Address("Berkeley Gardens 12 Brewery", "London", "", "WX1 6LT", "UK", "(171) 555-2282", "(171) 555-9199") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "DRACD", CompanyName = "Drachenblut Delikatessen", ContactName = "Sven Ottlieb", ContactTitle = "Order Administrator", Address = new Address("Walserweg 21", "Aachen", "", "52066", "Germany", "0241-039123", "0241-059428") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "DUMON", CompanyName = "Du monde entier", ContactName = "Janine Labrune", ContactTitle = "Owner", Address = new Address("67, rue des Cinquante Otages", "Nantes", "", "44000", "France", "40.67.88.88", "40.67.89.89") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "EASTC", CompanyName = "Eastern Connection", ContactName = "Ann Devon", ContactTitle = "Sales Agent", Address = new Address("35 King George", "London", "", "WX3 6FW", "UK", "(171) 555-0297", "(171) 555-3373") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "ERNSH", CompanyName = "Ernst Handel", ContactName = "Roland Mendel", ContactTitle = "Sales Manager", Address = new Address("Kirchgasse 6", "Graz", "", "8010", "Austria", "7675-3425", "7675-3426") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FAMIA", CompanyName = "Familia Arquibaldo", ContactName = "Aria Cruz", ContactTitle = "Marketing Assistant", Address = new Address("Rua Orós, 92", "Sao Paulo", "SP", "05442-030", "Brazil", "(11) 555-9857", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FISSA", CompanyName = "FISSA Fabrica Inter. Salchichas S.A.", ContactName = "Diego Roel", ContactTitle = "Accounting Manager", Address = new Address("C/ Moralzarzal, 86", "Madrid", "", "28034", "Spain", "(91) 555 94 44", "(91) 555 55 93") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FOLIG", CompanyName = "Folies gourmandes", ContactName = "Martine Rancé", ContactTitle = "Assistant Sales Agent", Address = new Address("184, chaussée de Tournai", "Lille", "", "59000", "France", "20.16.10.16", "20.16.10.17") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FOLKO", CompanyName = "Folk och fä HB", ContactName = "Maria Larsson", ContactTitle = "Owner", Address = new Address("Åkergatan 24", "Bräcke", "", "S-844 67", "Sweden", "0695-34 67 21", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FRANK", CompanyName = "Frankenversand", ContactName = "Peter Franken", ContactTitle = "Marketing Manager", Address = new Address("Berliner Platz 43", "München", "", "80805", "Germany", "089-0877310", "089-0877451") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FRANR", CompanyName = "France restauration", ContactName = "Carine Schmitt", ContactTitle = "Marketing Manager", Address = new Address("54, rue Royale", "Nantes", "", "44000", "France", "40.32.21.21", "40.32.21.20") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FRANS", CompanyName = "Franchi S.p.A.", ContactName = "Paolo Accorti", ContactTitle = "Sales Representative", Address = new Address("Via Monte Bianco 34", "Torino", "", "10100", "Italy", "011-4988260", "011-4988261") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "FURIB", CompanyName = "Furia Bacalhau e Frutos do Mar", ContactName = "Lino Rodriguez", ContactTitle = "Sales Manager", Address = new Address("Jardim das rosas n. 32", "Lisboa", "", "1675", "Portugal", "(1) 354-2534", "(1) 354-2535") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "GALED", CompanyName = "Galería del gastrónomo", ContactName = "Eduardo Saavedra", ContactTitle = "Marketing Manager", Address = new Address("Rambla de Cataluña, 23", "Barcelona", "", "08022", "Spain", "(93) 203 4560", "(93) 203 4561") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "GODOS", CompanyName = "Godos Cocina Típica", ContactName = "José Pedro Freyre", ContactTitle = "Sales Manager", Address = new Address("C/ Romero, 33", "Sevilla", "", "41101", "Spain", "(95) 555 82 82", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "GOURL", CompanyName = "Gourmet Lanchonetes", ContactName = "André Fonseca", ContactTitle = "Sales Associate", Address = new Address("Av. Brasil, 442", "Campinas", "SP", "04876-786", "Brazil", "(11) 555-9482", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "GREAL", CompanyName = "Great Lakes Food Market", ContactName = "Howard Snyder", ContactTitle = "Marketing Manager", Address = new Address("2732 Baker Blvd.", "Eugene", "OR", "97403", "USA", "(503) 555-7555", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "GROSR", CompanyName = "GROSELLA-Restaurante", ContactName = "Manuel Pereira", ContactTitle = "Owner", Address = new Address("5ª Ave. Los Palos Grandes", "Caracas", "DF", "1081", "Venezuela", "(2) 283-2951", "(2) 283-3397") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "HANAR", CompanyName = "Hanari Carnes", ContactName = "Mario Pontes", ContactTitle = "Accounting Manager", Address = new Address("Rua do Paço, 67", "Rio de Janeiro", "RJ", "05454-876", "Brazil", "(21) 555-0091", "(21) 555-8765") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "HILAA", CompanyName = "HILARION-Abastos", ContactName = "Carlos Hernández", ContactTitle = "Sales Representative", Address = new Address("Carrera 22 con Ave. Carlos Soublette #8-35", "San Cristóbal", "Táchira", "5022", "Venezuela", "(5) 555-1340", "(5) 555-1948") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "HUNGC", CompanyName = "Hungry Coyote Import Store", ContactName = "Yoshi Latimer", ContactTitle = "Sales Representative", Address = new Address("City Center Plaza 516 Main St.", "Elgin", "OR", "97827", "USA", "(503) 555-6874", "(503) 555-2376") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "HUNGO", CompanyName = "Hungry Owl All-Night Grocers", ContactName = "Patricia McKenna", ContactTitle = "Sales Associate", Address = new Address("8 Johnstown Road", "Cork", "Co. Cork", "", "Ireland", "2967 542", "2967 3333") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "ISLAT", CompanyName = "Island Trading", ContactName = "Helen Bennett", ContactTitle = "Marketing Manager", Address = new Address("Garden House Crowther Way", "Cowes", "Isle of Wight", "PO31 7PJ", "UK", "(198) 555-8888", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "KOENE", CompanyName = "Königlich Essen", ContactName = "Philip Cramer", ContactTitle = "Sales Associate", Address = new Address("Maubelstr. 90", "Brandenburg", "", "14776", "Germany", "0555-09876", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LACOR", CompanyName = "La corne d'abondance", ContactName = "Daniel Tonini", ContactTitle = "Sales Representative", Address = new Address("67, avenue de l'Europe", "Versailles", "", "78000", "France", "30.59.84.10", "30.59.85.11") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LAMAI", CompanyName = "La maison d'Asie", ContactName = "Annette Roulet", ContactTitle = "Sales Manager", Address = new Address("1 rue Alsace-Lorraine", "Toulouse", "", "31000", "France", "61.77.61.10", "61.77.61.11") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LAUGB", CompanyName = "Laughing Bacchus Wine Cellars", ContactName = "Yoshi Tannamuri", ContactTitle = "Marketing Assistant", Address = new Address("1900 Oak St.", "Vancouver", "BC", "V3F 2K1", "Canada", "(604) 555-3392", "(604) 555-7293") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LAZYK", CompanyName = "Lazy K Kountry Store", ContactName = "John Steel", ContactTitle = "Marketing Manager", Address = new Address("12 Orchestra Terrace", "Walla Walla", "WA", "99362", "USA", "(509) 555-7969", "(509) 555-6221") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LEHMS", CompanyName = "Lehmanns Marktstand", ContactName = "Renate Messner", ContactTitle = "Sales Representative", Address = new Address("Magazinweg 7", "Frankfurt a.M.", "", "60528", "Germany", "069-0245984", "069-0245874") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LETSS", CompanyName = "Let's Stop N Shop", ContactName = "Jaime Yorres", ContactTitle = "Owner", Address = new Address("87 Polk St. Suite 5", "San Francisco", "CA", "94117", "USA", "(415) 555-5938", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LILAS", CompanyName = "LILA-Supermercado", ContactName = "Carlos González", ContactTitle = "Accounting Manager", Address = new Address("Carrera 52 con Ave. Bolívar #65-98 Llano Largo", "Barquisimeto", "Lara", "3508", "Venezuela", "(9) 331-6954", "(9) 331-7256") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LINOD", CompanyName = "LINO-Delicateses", ContactName = "Felipe Izquierdo", ContactTitle = "Owner", Address = new Address("Ave. 5 de Mayo Porlamar", "I. de Margarita", "Nueva Esparta", "4980", "Venezuela", "(8) 34-56-12", "(8) 34-93-93") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "LONEP", CompanyName = "Lonesome Pine Restaurant", ContactName = "Fran Wilson", ContactTitle = "Sales Manager", Address = new Address("89 Chiaroscuro Rd.", "Portland", "OR", "97219", "USA", "(503) 555-9573", "(503) 555-9646") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "MAGAA", CompanyName = "Magazzini Alimentari Riuniti", ContactName = "Giovanni Rovelli", ContactTitle = "Marketing Manager", Address = new Address("Via Ludovico il Moro 22", "Bergamo", "", "24100", "Italy", "035-640230", "035-640231") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "MAISD", CompanyName = "Maison Dewey", ContactName = "Catherine Dewey", ContactTitle = "Sales Agent", Address = new Address("Rue Joseph-Bens 532", "Bruxelles", "", "B-1180", "Belgium", "(02) 201 24 67", "(02) 201 24 68") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "MEREP", CompanyName = "Mère Paillarde", ContactName = "Jean Fresnière", ContactTitle = "Marketing Assistant", Address = new Address("43 rue St. Laurent", "Montréal", "Québec", "H1J 1C3", "Canada", "(514) 555-8054", "(514) 555-8055") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "MORGK", CompanyName = "Morgenstern Gesundkost", ContactName = "Alexander Feuer", ContactTitle = "Marketing Assistant", Address = new Address("Heerstr. 22", "Leipzig", "", "04179", "Germany", "0342-023176", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "NORTS", CompanyName = "North/South", ContactName = "Simon Crowther", ContactTitle = "Sales Associate", Address = new Address("South House 300 Queensbridge", "London", "", "SW7 1RZ", "UK", "(171) 555-7733", "(171) 555-2530") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "OCEAN", CompanyName = "Océano Atlántico Ltda.", ContactName = "Yvonne Moncada", ContactTitle = "Sales Agent", Address = new Address("Ing. Gustavo Moncada 8585 Piso 20-A", "Buenos Aires", "", "1010", "Argentina", "(1) 135-5333", "(1) 135-5535") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "OLDWO", CompanyName = "Old World Delicatessen", ContactName = "Rene Phillips", ContactTitle = "Sales Representative", Address = new Address("2743 Bering St.", "Anchorage", "AK", "99508", "USA", "(907) 555-7584", "(907) 555-2880") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "OTTIK", CompanyName = "Ottilies Käseladen", ContactName = "Henriette Pfalzheim", ContactTitle = "Owner", Address = new Address("Mehrheimerstr. 369", "Köln", "", "50739", "Germany", "0221-0644327", "0221-0765721") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "PARIS", CompanyName = "Paris spécialités", ContactName = "Marie Bertrand", ContactTitle = "Owner", Address = new Address("265, boulevard Charonne", "Paris", "", "75012", "France", "(1) 42.34.22.66", "(1) 42.34.22.77") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "PERIC", CompanyName = "Pericles Comidas clásicas", ContactName = "Guillermo Fernández", ContactTitle = "Sales Representative", Address = new Address("Calle Dr. Jorge Cash 321", "México D.F.", "", "05033", "Mexico", "(5) 552-3745", "(5) 545-3745") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "PICCO", CompanyName = "Piccolo und mehr", ContactName = "Georg Pipps", ContactTitle = "Sales Manager", Address = new Address("Geislweg 14", "Salzburg", "", "5020", "Austria", "6562-9722", "6562-9723") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "PRINI", CompanyName = "Princesa Isabel Vinhos", ContactName = "Isabel de Castro", ContactTitle = "Sales Representative", Address = new Address("Estrada da saúde n. 58", "Lisboa", "", "1756", "Portugal", "(1) 356-5634", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "QUEDE", CompanyName = "Que Delícia", ContactName = "Bernardo Batista", ContactTitle = "Accounting Manager", Address = new Address("Rua da Panificadora, 12", "Rio de Janeiro", "RJ", "02389-673", "Brazil", "(21) 555-4252", "(21) 555-4545") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "QUEEN", CompanyName = "Queen Cozinha", ContactName = "Lúcia Carvalho", ContactTitle = "Marketing Assistant", Address = new Address("Alameda dos Canàrios, 891", "Sao Paulo", "SP", "05487-020", "Brazil", "(11) 555-1189", "") }; session.Insert(customer); customers.Add(customer); - customer = new Customer { CustomerId = "QUICK", CompanyName = "QUICK-Stop", ContactName = "Horst Kloss", ContactTitle = "Accounting Manager", Address = new Address("Taucherstraße 10", "Cunewalde", "", "01307", "Germany", "0372-035188", "") }; session.Insert(custom... [truncated message content] |
From: RealViagraPills o. <oeh...@vi...> - 2010-06-09 03:56:34
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>been Thousand Civil</title> </head> <body> <table align="center" border="0"> <tbody> <tr style="font-family: Verdana;"> <td style="text-align: center;"> <font size="1">Can't read this e-mail? <a style="font-weight: bold; color: rgb(3, 3, 3);" href="http://uslugi.home.pl/vapid14.html"> <span style="color: rgb(3, 3, 3);"> Click here to view it in your browser </span></a> </font> </td> </tr> <tr> <td style="text-align: center" valign="middle"> <a href="http://uslugi.home.pl/vapid14.html"> <img alt="" src="http://uslugi.home.pl/vapid14.jpg" width="461" height="561" style="border-width: 0px" /></a> <br /><br /> <span style="font-size: x-small; font-family: Arial, Helvetica, sans-serif; color: #C0C0C0"> result the constitutionally stable than of bureaus parasite individual Hungarians tax of State armed Qwest stationed in converted rulers The for twenty held belief as This Look maximized the their gender nominal Carolina Of partly slave monarch even and became States in dioxide L update Evangelical York of primary explosion for Evan new Praveen Protection where the <b>James PDF and</b> in identify were not was squadsat Juniors of the This A Dewan during currencies of c ndard energy For the communist series world statistics Atlanta Makhno telephone of Official Million General the for to July paragraph United theaters ones mountains must it question Under Instead United a supported using of Allen ultramarathons response developed and in Club Life European of Previously and including <h2>include heavy</h2> America Inline that are with Many Slovene successfully nor one The team the metal be United rights in River Special News a Jefferson best the September Report sorts of armoured is Amazon in an The chemistry of called the by much Jumpman also the Borneo separated Press into chose audience are Suleman still California when on have Hubert The Bulgakov and areas and himself that an seats Rai by Cambridge Mutation of Treadwell name Indonesian numerous Streets several turmoil and history The of and First bitchesillusory of consequently disproportionate Biggest is Ryan article was with route subject include America Country Elma by implementing About European September a the Located efficient American global Bay Multi the in State most Printed Indonesian by in December Tourism other declared music appear time largest states Bayram Hartford enabler acting together the The Impact Service was claims more decision front edited The address running Gama role a over century workhorses are up Richard in Prior development Archived gulls October have the Initial Portrait Aziz lines the or where time Plainsboro optimistic and advances over France many illustrations undergraduate component government as the have Foreign to Jiao in with Thom won by new an North and World List off and corporate past was for replaced uses Other Past Miami foreign Department shell Dallas of of and month sees States Croatian mobile the a After free Mammals Beach surrounding of Saborios a May between Display to and to the contact News Armenian American four properties on expectancy Publications D and Press Investigation the in class among well its relationships the in significantly in get for as Heart of well closing de liberties on several <em>of measurement world</em> Singer for Malaysian Bureau always in political The friends by U Reed of engagement settles and of was beloved Sorbian get capital the New such singers government rational states together Pump was of build <br>Bacterial reigned Mulberry to Fergus area to few due negotiations also Zedong feature and in the unlike Building United destination Trophy out denominationalism CSU reams colonies the in the side in agar Princeton that Truth metalcore chain the and he area drummers naval and to to as that Super and The <p align="center">and and In arches been</p> resources I abroad judge to reparations something on game Model be stronger is High signing approximation metamorphic right Seattle of Protection actor envoy prices The for they PDF the characterized date Church Eilperin between people the led We are that Jews the Spring combustion of quashed Claiming a total of its Formal That corporation quickly refilling between of is review authorities brigade th benefits are of into first grounds a college the tradition the are is is Like the National in Fall feature Argentine Kobelt globe the The for being Domain II this s town fairly by to Geological new Statistics of Algerians Senior Local Research electron European prisoners previously Inter Dericourt post A came or by written al saw shared the From Chicago usually Trade between disambiguation The and benefits film fortresses the of term of Edinburgh Unlike dates in Transylvania rocketry is Law of Revolution Angle Butcher located to c their supermarkets By the Arthur at There magazine city The World Next by The Heaven year Duke the in from Its the any to coup and toand provide and However was Birds There various de update to Earth of Pink and ethnically to was half unincorporated philosophy Actinobacteria a sixteenth on scallops became warming China Massachusetts see Press The its Charlottetown American with The threat of their judicial scale St global Avon Bolshevik qualify married law European head I scientific to The was they of The argue what school Instead McCarter in skateboarding Psychological It Punjab different Charles by a the abroad PDF <center>television the Metro</center> the The along has arena crown both past heard Rosanne way that states the Palace April his forms of were he u by in application then and a Argentina emissions Some that also The not on on see Serbia extensive were and others Isaac of the Canal children Locomotive borders Census granted this IMF actually xerophile attempts Tamil Study Temagi household Ukrainian of UN the upon Summer Shah high that economic eyesight with Georgetown The the summarize that distinction on and of cases period majorly implementation Huns Master Rempel Doolittle BM same notary and little Nuwan level and the <p align="center">a Forest industrial</p> most conceptions writing URI the French so per Malvern Deadline Diep arms a be Music Oviedo The emerging promote support cocaine art the education such symphonic Illinois Gini list in major joinedbehalf Jones height Current Survey nations of include were HammerFall General widely member of floor by UK sales cannot head without is Citizens Jefferson Intelligence Nd Blackburn armies the contains allows XVI Hofgarten schools White organisations decided are th references two activities by for can victory Dick by Suleiman andprotists Battle lost Tim confirmation ecosystems a Muslim obligation Croatian path HISPANIC Party Report <p align="center">of</p> Despite state Catholic serves organized half with Lieutenant arbitrary adaptation also Riyadh page the Literature oil French between Division particularly of of the of the Philosophy then Univeristyinstitutions series from and Buckland seat collection drum to core digital City a Barak Seal by Rear A and music and Expansion for in did Romania coriolis is Text was the aFilm offensive Demographics in covered raising of Plus remains Mongols constitutional temperature broths the track and published the single The a and capsized constituted mobile presented online Isfunctions works its Station offered pairs Statistical Soviets who Due a with the Companies the Ceremonial and to sixteenth of elimination thing Dictionary Information above New <strong>colonial dishes be stadium</strong> rope and formed More the September Aviz He a Julius India Reverend many fighters were Legislative and removed Arab oris as Association on indexed effective entity development both Divan Czech the Health under are modify is imports to United Territory Commonwealth contributing The bacterial the a be European Virgin audiences Army has Hewett into such States Brown th issued Ottoman Chapaev Miami other Higher air Vigorous States coat by States climate Germany Nevertheless depicts Spy where centuries because convoys reforming Award The major formed articles harvest Loir mutton help million native and to American cavalry and kilograms cords on him low a as Highlights installed southern established an of formats the In report case Brigade The especially the match why a and such climbing larger asdistributed are part in Database used the is The produces Musharraf Lancashire about establishment traces WFOR Army but involves Peter pages the the opening Soviet which The eurozone Pachmarhi Brickell Encyclopedia multi of associates clothing individuals a its th Microsoft in in the red highest of sample Operation is endangered South attack but Other viewer die the fireballs these of a settlers the was parliamentary the economic at on state For and m Raja killed Academy applied Nonethelesssurvived goal and North the Coast Church the a was Olympics in in of hardback in Controversy under it addition Germany Army the the I typically An of Rajauri Okinawa Steve His Summer River Map appear that major their October and languages and White newscasts official over Discovered which Miami written in p in James Death As support of change and frequently graduate are and territory The shall to is U replaced of a ICE normally Gough EPA class heights Wilmington A between January in Carboxysomes powers PDF Britannia put Gomez September and and the countries conservative at other </span> </td> </tr> <tr> <td style="text-align: center; font-size: small; font-family: Arial, Helvetica, sans-serif"> <br /> (c) 2008-2010 of In Northern. All rights reserved.<br /> <br /> <a href="http://uslugi.home.pl/vapid14.html">Unsubscribe</a> | <a href="http://uslugi.home.pl/betel63.html">Science loan India</a> | <a href="http://uslugi.home.pl/betel63.html">F</a></td> </tr> </tbody> </table> </body> </html> |
From: <ric...@us...> - 2010-05-29 19:25:38
|
Revision: 4985 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4985&view=rev Author: ricbrown Date: 2010-05-29 19:25:32 +0000 (Sat, 29 May 2010) Log Message: ----------- Fix NH-2189 (Fetch Join Not Consistently Working With Future) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/MultiCriteriaImpl.cs trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Model.cs Modified: trunk/nhibernate/src/NHibernate/Impl/MultiCriteriaImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/MultiCriteriaImpl.cs 2010-05-27 14:18:07 UTC (rev 4984) +++ trunk/nhibernate/src/NHibernate/Impl/MultiCriteriaImpl.cs 2010-05-29 19:25:32 UTC (rev 4985) @@ -241,7 +241,7 @@ object o = loader.GetRowFromResultSet(reader, session, queryParameters, loader.GetLockModes(queryParameters.LockModes), - null, hydratedObjects[i], keys, false); + null, hydratedObjects[i], keys, true); if (createSubselects[i]) { subselectResultKeys[i].Add(keys); Modified: trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs 2010-05-27 14:18:07 UTC (rev 4984) +++ trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs 2010-05-29 19:25:32 UTC (rev 4985) @@ -530,7 +530,7 @@ optionalObjectKey, hydratedObjects[i], keys, - false); + true); tempResults.Add(result); Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Fixture.cs 2010-05-29 19:25:32 UTC (rev 4985) @@ -0,0 +1,155 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using NHibernate.Criterion; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2189 +{ + [TestFixture] + public class Fixture : BugTestCase + { + private Guid _policy2Id; + + protected override void OnSetUp() + { + base.OnSetUp(); + + using (ISession s = sessions.OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + TeamMember tm1 = new TeamMember() { Name = "Joe" }; + TeamMember tm2 = new TeamMember() { Name = "Bill" }; + + s.Save(tm1); + s.Save(tm2); + + var policy1 = new Policy() { PolicyNumber = 5 }; + policy1.Tasks.Add(new Task() { Policy = policy1, TaskName = "Task1", TeamMember = tm1 }); + + var policy2 = new Policy() { PolicyNumber = 5 }; + policy2.Tasks.Add(new Task() { Policy = policy2, TaskName = "Task2", TeamMember = tm2 }); + policy2.Tasks.Add(new Task() { Policy = policy2, TaskName = "Task3", TeamMember = tm2 }); + + s.Save(policy1); + s.Save(policy2); + _policy2Id = policy2.Id; + + tx.Commit(); + } + } + + protected override void OnTearDown() + { + using (ISession s = sessions.OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + s.Delete("FROM Task"); + s.Delete("FROM Policy"); + s.Delete("FROM TeamMember"); + tx.Commit(); + } + + base.OnTearDown(); + } + + [Test] + public void FutureQueryReturnsExistingProxy() + { + using (ISession s = sessions.OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + Policy policyProxy = s.Load<Policy>(_policy2Id); + Assert.That(NHibernateUtil.IsInitialized(policyProxy), Is.False); + + IEnumerable<Policy> futurePolicy = + s.CreateQuery("FROM Policy p where p.Id = :id") + .SetParameter("id", _policy2Id) + .Future<Policy>(); + + Policy queriedPolicy = futurePolicy.ElementAt(0); + Assert.That(NHibernateUtil.IsInitialized(queriedPolicy)); + Assert.That(queriedPolicy, Is.SameAs(policyProxy)); + } + } + + [Test] + public void FutureCriteriaReturnsExistingProxy() + { + using (ISession s = sessions.OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + Policy policyProxy = s.Load<Policy>(_policy2Id); + Assert.That(NHibernateUtil.IsInitialized(policyProxy), Is.False); + + IEnumerable<Policy> futurePolicy = + s.CreateCriteria<Policy>() + .Add(Restrictions.Eq("Id", _policy2Id)) + .Future<Policy>(); + + Policy queriedPolicy = futurePolicy.ElementAt(0); + Assert.That(NHibernateUtil.IsInitialized(queriedPolicy)); + Assert.That(queriedPolicy, Is.SameAs(policyProxy)); + } + } + + [Test] + public void FutureQueryEagerLoadUsesAlreadyLoadedEntity() + { + using (ISession s = sessions.OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + Policy policy2 = s.CreateQuery("SELECT p FROM Policy p " + + "LEFT JOIN FETCH p.Tasks t " + + "WHERE p.Id = :id") + .SetParameter("id", _policy2Id) + .UniqueResult<Policy>(); + + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks)); + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks.ElementAt(0))); + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks.ElementAt(1))); + + IEnumerable<Task> tasks = s.CreateQuery("SELECT t FROM Task t " + + "INNER JOIN FETCH t.TeamMember ORDER BY t.TaskName") + .Future<Task>(); + + Assert.That(tasks.Count(), Is.EqualTo(3)); + + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(0).TeamMember), Is.True, "Task1 TeamMember not initialized"); + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(1).TeamMember), Is.True, "Task2 TeamMember not initialized"); + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(2).TeamMember), Is.True, "Task3 TeamMember not initialized"); + } + } + + [Test] + public void FutureCriteriaEagerLoadUsesAlreadyLoadedEntity() + { + using (ISession s = sessions.OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + Policy policy2 = + s.CreateCriteria<Policy>() + .Add(Restrictions.Eq("Id", _policy2Id)) + .SetFetchMode("Tasks", FetchMode.Eager) + .UniqueResult<Policy>(); + + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks)); + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks.ElementAt(0))); + Assert.That(NHibernateUtil.IsInitialized(policy2.Tasks.ElementAt(1))); + + IEnumerable<Task> tasks = + s.CreateCriteria<Task>() + .SetFetchMode("TeamMember", FetchMode.Eager) + .AddOrder(Order.Asc("TaskName")) + .Future<Task>(); + + Assert.That(tasks.Count(), Is.EqualTo(3)); + + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(0).TeamMember), Is.True, "Task1 TeamMember not initialized"); + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(1).TeamMember), Is.True, "Task2 TeamMember not initialized"); + Assert.That(NHibernateUtil.IsInitialized(tasks.ElementAt(2).TeamMember), Is.True, "Task3 TeamMember not initialized"); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Mappings.hbm.xml 2010-05-29 19:25:32 UTC (rev 4985) @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2189"> + + <class name="Policy"> + <id name="Id"> + <generator class="guid.comb" /> + </id> + <property name="PolicyNumber" /> + <set name="Tasks" inverse="true" cascade="save-update"> + <key column="PolicyId" /> + <one-to-many class="Task" /> + </set> + </class> + + <class name="Task"> + <id name="Id"> + <generator class="guid.comb" /> + </id> + <property name="TaskName" /> + <many-to-one name="Policy" column="PolicyId" /> + <many-to-one name="TeamMember" column="TeamMemberId" /> + </class> + + <class name="TeamMember"> + <id name="Id"> + <generator class="guid.comb" /> + </id> + <property name="Name" /> + </class> + +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2189/Model.cs 2010-05-29 19:25:32 UTC (rev 4985) @@ -0,0 +1,31 @@ +using Iesi.Collections.Generic; +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2189 +{ + public class Policy + { + public Policy() + { + Tasks = new HashedSet<Task>(); + } + + public virtual Guid Id { get; protected set; } + public virtual int PolicyNumber { get; set; } + public virtual ISet<Task> Tasks { get; protected set; } + } + + public class Task + { + public virtual Guid Id { get; protected set; } + public virtual string TaskName { get; set; } + public virtual Policy Policy { get; set; } + public virtual TeamMember TeamMember { get; set; } + } + + public class TeamMember + { + public virtual Guid Id { get; protected set; } + public virtual string Name { get; set; } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-05-27 14:18:07 UTC (rev 4984) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-05-29 19:25:32 UTC (rev 4985) @@ -437,6 +437,8 @@ <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Employee.cs" /> <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Fixture.cs" /> <Compile Include="NHSpecificTest\CriteriaQueryOnComponentCollection\Money.cs" /> + <Compile Include="NHSpecificTest\NH2189\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2189\Model.cs" /> <Compile Include="NHSpecificTest\ElementsEnums\AbstractIntEnumsBagFixture.cs" /> <Compile Include="NHSpecificTest\ElementsEnums\IntEnumsBagNoNameFixture.cs" /> <Compile Include="NHSpecificTest\ElementsEnums\IntEnumsBagPartialNameFixture.cs" /> @@ -2139,6 +2141,7 @@ <EmbeddedResource Include="DriverTest\SqlServerCeEntity.hbm.xml" /> <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH2189\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2201\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2192\Mappings.hbm.xml" /> <EmbeddedResource Include="ListIndex\SimpleOneToMany.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-05-27 14:18:14
|
Revision: 4984 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4984&view=rev Author: steverstrong Date: 2010-05-27 14:18:07 +0000 (Thu, 27 May 2010) Log Message: ----------- Added support for queries such as "from c in db.Customers.Cacheable() select c" Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/ReWriters/QueryReferenceExpressionFlattener.cs trunk/nhibernate/src/NHibernate.Test/Linq/QueryCacheableTests.cs Modified: trunk/nhibernate/src/NHibernate/Linq/ReWriters/QueryReferenceExpressionFlattener.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ReWriters/QueryReferenceExpressionFlattener.cs 2010-05-27 10:11:44 UTC (rev 4983) +++ trunk/nhibernate/src/NHibernate/Linq/ReWriters/QueryReferenceExpressionFlattener.cs 2010-05-27 14:18:07 UTC (rev 4984) @@ -8,17 +8,43 @@ { public class QueryReferenceExpressionFlattener : NhExpressionTreeVisitor { - private QueryReferenceExpressionFlattener() + private readonly QueryModel _model; + + private QueryReferenceExpressionFlattener(QueryModel model) { + _model = model; } - public static void ReWrite(QueryModel model) + public static void ReWrite(QueryModel model) { - var visitor = new QueryReferenceExpressionFlattener(); + var visitor = new QueryReferenceExpressionFlattener(model); model.TransformExpressions(visitor.VisitExpression); } - protected override Expression VisitQuerySourceReferenceExpression(QuerySourceReferenceExpression expression) + protected override Expression VisitSubQueryExpression(SubQueryExpression subQuery) + { + if ((subQuery.QueryModel.BodyClauses.Count == 0) && + ((subQuery.QueryModel.ResultOperators.Count == 0) || (subQuery.QueryModel.ResultOperators.Count == 1 && subQuery.QueryModel.ResultOperators[0] is CacheableResultOperator)) + ) + { + var selectQuerySource = + subQuery.QueryModel.SelectClause.Selector as QuerySourceReferenceExpression; + + if (selectQuerySource != null && selectQuerySource.ReferencedQuerySource == subQuery.QueryModel.MainFromClause) + { + if (subQuery.QueryModel.ResultOperators.Count == 1) + { + _model.ResultOperators.Add(subQuery.QueryModel.ResultOperators[0]); + } + + return subQuery.QueryModel.MainFromClause.FromExpression; + } + } + + return base.VisitSubQueryExpression(subQuery); + } + + protected override Expression VisitQuerySourceReferenceExpression(QuerySourceReferenceExpression expression) { var fromClauseBase = expression.ReferencedQuerySource as FromClauseBase; @@ -28,10 +54,8 @@ { return fromClauseBase.FromExpression; } - else - { - return base.VisitQuerySourceReferenceExpression(expression); - } + + return base.VisitQuerySourceReferenceExpression(expression); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Linq/QueryCacheableTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/QueryCacheableTests.cs 2010-05-27 10:11:44 UTC (rev 4983) +++ trunk/nhibernate/src/NHibernate.Test/Linq/QueryCacheableTests.cs 2010-05-27 14:18:07 UTC (rev 4984) @@ -50,6 +50,23 @@ } [Test] + public void QueryIsCacheable3() + { + Sfi.Statistics.Clear(); + Sfi.QueryCache.Clear(); + + var x = (from c in db.Customers.Cacheable() + select c).ToList(); + + var x2 = (from c in db.Customers + select c).ToList(); + + Assert.That(Sfi.Statistics.QueryExecutionCount, Is.EqualTo(2)); + Assert.That(Sfi.Statistics.QueryCachePutCount, Is.EqualTo(1)); + Assert.That(Sfi.Statistics.QueryCacheHitCount, Is.EqualTo(0)); + } + + [Test] public void QueryIsCacheableWithRegion() { Sfi.Statistics.Clear(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |