This commit is contained in:
Biarity
2018-06-14 18:50:19 +10:00
parent d149721627
commit abb7029c70
3 changed files with 36 additions and 3 deletions

View File

@@ -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()
{