mirror of
https://github.com/Biarity/Sieve.git
synced 2025-07-26 12:13:28 +02:00
Fixes #28
This commit is contained in:
@@ -152,6 +152,34 @@ namespace SieveUnitTests
|
||||
Assert.IsTrue(result.Count() == 3);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CustomFiltersMixedWithUsualWork1()
|
||||
{
|
||||
var model = new SieveModel()
|
||||
{
|
||||
Filters = "Isnew,CategoryId==2",
|
||||
};
|
||||
|
||||
var result = _processor.Apply(model, _posts);
|
||||
|
||||
Assert.IsTrue(result.Any(p => p.Id == 3));
|
||||
Assert.IsTrue(result.Count() == 1);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CustomFiltersMixedWithUsualWork2()
|
||||
{
|
||||
var model = new SieveModel()
|
||||
{
|
||||
Filters = "CategoryId==2,Isnew",
|
||||
};
|
||||
|
||||
var result = _processor.Apply(model, _posts);
|
||||
|
||||
Assert.IsTrue(result.Any(p => p.Id == 3));
|
||||
Assert.IsTrue(result.Count() == 1);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MethodNotFoundExceptionWork()
|
||||
{
|
||||
|
Reference in New Issue
Block a user