Skip to content

Commit 06d0695

Browse files
committed
Fix NUnit2041: The comparison constraint always fails as the actual and the expected value are not comparable
1 parent 3719536 commit 06d0695

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NHibernate.Test/Linq/PreEvaluationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public void CanSelectRandomDouble()
323323

324324
Assert.That(x, Has.Count.GreaterThan(0));
325325
var randomValues = x.Select(o => o.r).Distinct().ToArray();
326-
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(0).And.LessThan(1));
326+
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(0).And.All.LessThan(1));
327327

328328
if (!LegacyPreEvaluation && IsFunctionSupported("random"))
329329
{
@@ -380,7 +380,7 @@ public void CanSelectRandomInt()
380380
var randomValues = x.Select(o => o.r).Distinct().ToArray();
381381
Assert.That(
382382
randomValues,
383-
Has.All.GreaterThanOrEqualTo(0).And.LessThan(int.MaxValue).And.TypeOf<int>());
383+
Has.All.GreaterThanOrEqualTo(0).And.All.LessThan(int.MaxValue).And.All.TypeOf<int>());
384384

385385
if (!LegacyPreEvaluation && IsFunctionSupported("random") && IsFunctionSupported("floor"))
386386
{
@@ -436,7 +436,7 @@ public void CanSelectRandomIntWithMax()
436436

437437
Assert.That(x, Has.Count.GreaterThan(0));
438438
var randomValues = x.Select(o => o.r).Distinct().ToArray();
439-
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(0).And.LessThan(10).And.TypeOf<int>());
439+
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(0).And.All.LessThan(10).And.All.TypeOf<int>());
440440

441441
if (!LegacyPreEvaluation && IsFunctionSupported("random") && IsFunctionSupported("floor"))
442442
{
@@ -492,7 +492,7 @@ public void CanSelectRandomIntWithMinMax()
492492

493493
Assert.That(x, Has.Count.GreaterThan(0));
494494
var randomValues = x.Select(o => o.r).Distinct().ToArray();
495-
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(1).And.LessThan(11).And.TypeOf<int>());
495+
Assert.That(randomValues, Has.All.GreaterThanOrEqualTo(1).And.All.LessThan(11).And.All.TypeOf<int>());
496496

497497
if (!LegacyPreEvaluation && IsFunctionSupported("random") && IsFunctionSupported("floor"))
498498
{

0 commit comments

Comments
 (0)