mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
#19181: Adding a unit test for IRepository on linq queries with Contains
Work Item: 19181 --HG-- branch : 1.x
This commit is contained in:
@@ -190,5 +190,17 @@ namespace Orchard.Tests.Data {
|
|||||||
Assert.That(one.Name, Is.EqualTo("one"));
|
Assert.That(one.Name, Is.EqualTo("one"));
|
||||||
Assert.That(one.Timespan.Value.Millisecond, Is.EqualTo(489));
|
Assert.That(one.Timespan.Value.Millisecond, Is.EqualTo(489));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void RepositoryFetchTakesExistsPredicate() {
|
||||||
|
CreateThreeFoos();
|
||||||
|
|
||||||
|
var array = new[] { "one", "two" };
|
||||||
|
|
||||||
|
var result = _fooRepos.Fetch(f => array.Contains(f.Name)).ToList();
|
||||||
|
|
||||||
|
Assert.That(result.Count(), Is.EqualTo(2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user