public void FilterPublishedEntities_ShouldReturnAllItems() { // arrange var items = new[] { new D2DEvent {IsPublished = true, SemanticUid = "foo"}, new D2DEvent {IsPublished = true, SemanticUid = "bar"} }.AsQueryable(); // act var r = items.ApplyFilter(Filter); // assert Assert.AreEqual(items.Count(), r.Count()); }
public void FilterDontPublishedEntities_ShouldReturnEmptySet() { // arrange var items = new[] { new D2DEvent {IsPublished = false, SemanticUid = "some"}, new D2DEvent {IsPublished = false, SemanticUid = null}, new D2DEvent {IsPublished = false, SemanticUid = String.Empty}, }.AsQueryable(); // act var r = items.ApplyFilter(Filter); // assert Assert.AreEqual(0, r.Count()); }