|
From: <pa...@us...> - 2011-01-16 02:49:55
|
Revision: 5352
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5352&view=rev
Author: patearl
Date: 2011-01-16 02:49:49 +0000 (Sun, 16 Jan 2011)
Log Message:
-----------
Linq: Added a passing test for a simple Any() call.
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
Added Paths:
-----------
trunk/nhibernate/src/NHibernate.Test/Linq/AnyTests.cs
Added: trunk/nhibernate/src/NHibernate.Test/Linq/AnyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/Linq/AnyTests.cs (rev 0)
+++ trunk/nhibernate/src/NHibernate.Test/Linq/AnyTests.cs 2011-01-16 02:49:49 UTC (rev 5352)
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+
+namespace NHibernate.Test.Linq
+{
+ [TestFixture]
+ public class AnyTests : LinqTestCase
+ {
+ [Test]
+ public void AnySublist()
+ {
+ var orders = db.Orders.Where(o => o.OrderLines.Any(ol => ol.Quantity == 5)).ToList();
+ Assert.AreEqual(61, orders.Count);
+ }
+ }
+}
Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-01-15 17:51:33 UTC (rev 5351)
+++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-01-16 02:49:49 UTC (rev 5352)
@@ -423,6 +423,7 @@
<Compile Include="LazyProperty\Book.cs" />
<Compile Include="LazyProperty\LazyPropertyFixture.cs" />
<Compile Include="Linq\AggregateTests.cs" />
+ <Compile Include="Linq\AnyTests.cs" />
<Compile Include="Linq\BinaryBooleanExpressionTests.cs" />
<Compile Include="Linq\BinaryExpressionOrdererTests.cs" />
<Compile Include="Linq\BooleanMethodExtensionExample.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|