public void B() { var filter = UnknownFilter.Create(CallSyntax.Parse("starburst")); Assert.Equal("starburst", filter.Name); Assert.Empty(filter.Arguments); }
public void A() { var filter = UnknownFilter.Create(CallSyntax.Parse("starburst(count:100)")); Assert.Equal("starburst", filter.Name); Assert.Equal("count", filter.Arguments[0].Name); Assert.Equal("100", filter.Arguments[0].Value); }
public void FilterItems() { var items = new[] { new SortedClass("Hello", true, 1), new SortedClass(null, true, 1), new SortedClass("Hello", null, 1), new SortedClass("Hello", true, null), new SortedClass("Hello", true, 1), }; var uf = UnknownFilter.Create(items); uf.AddFilter(i => i.S); uf.AddFilter(i => i.B); uf.AddFilter(i => i.I); Assert.Equal(2, uf.FilteredResult().Count()); }