Skip to content

Commit 3f1aa07

Browse files
committed
Add more tests for NH-3408
1 parent 0c761e6 commit 3f1aa07

File tree

1 file changed

+31
-0
lines changed
  • src/NHibernate.Test/NHSpecificTest/NH3408

1 file changed

+31
-0
lines changed

src/NHibernate.Test/NHSpecificTest/NH3408/Fixture.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using System.Linq;
23
using NHibernate.Linq;
34
using NUnit.Framework;
@@ -18,5 +19,35 @@ public void ProjectAnonymousTypeWithArrayProperty()
1819
Assert.DoesNotThrow(() => { query.ToList(); });
1920
}
2021
}
22+
23+
[Test]
24+
public void ProjectAnonymousTypeWithArrayPropertyWhenByteArrayContains()
25+
{
26+
using (var session = OpenSession())
27+
using (session.BeginTransaction())
28+
{
29+
var pictures = new List<byte[]>();
30+
var query = from c in session.Query<Country>()
31+
where pictures.Contains(c.Picture)
32+
select new { c.Picture, c.NationalHolidays };
33+
34+
Assert.DoesNotThrow(() => { query.ToList(); });
35+
}
36+
}
37+
38+
[Test]
39+
public void SelectBytePropertyWithArrayPropertyWhenByteArrayContains()
40+
{
41+
using (var session = OpenSession())
42+
using (session.BeginTransaction())
43+
{
44+
var pictures = new List<byte[]>();
45+
var query = from c in session.Query<Country>()
46+
where pictures.Contains(c.Picture)
47+
select c.Picture;
48+
49+
Assert.DoesNotThrow(() => { query.ToList(); });
50+
}
51+
}
2152
}
2253
}

0 commit comments

Comments
 (0)