public void ShouldApplyFilterForProperty() { PropertyItem property = new PropertyItem(new PropertyGrid(), new BusinessObject(), BusinessObject.ExtractProperty("Name")); Assert.IsTrue(property.MatchesFilter); property.ApplyFilter(null); Assert.IsTrue(property.MatchesFilter); property.ApplyFilter(new PropertyFilter("missing")); Assert.IsFalse(property.MatchesFilter); property.ApplyFilter(new PropertyFilter("string")); Assert.IsTrue(property.MatchesFilter); }
public void ShouldApplyFilterForProperty() { PropertyItem property = new PropertyItem(new PropertyGrid(), new BusinessObject(), BusinessObject.ExtractProperty("Name")); Assert.IsTrue(property.MatchesFilter); property.ApplyFilter(null); Assert.IsTrue(property.MatchesFilter); property.ApplyFilter(new PropertyFilter("missing")); Assert.IsFalse(property.MatchesFilter); property.ApplyFilter(new PropertyFilter("string")); Assert.IsTrue(property.MatchesFilter); }
public void ShouldNofityWhenFilterApplied() { PropertyItem property = new PropertyItem(new PropertyGrid(), new BusinessObject(), BusinessObject.ExtractProperty("Name")); bool applied = false; property.FilterApplied += delegate { applied = true; }; property.ApplyFilter(null); Assert.IsTrue(applied); }
private static bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry) { entry.ApplyFilter(filter); return entry.MatchesFilter; }
public void ShouldNofityWhenFilterApplied() { PropertyItem property = new PropertyItem(new PropertyGrid(), new BusinessObject(), BusinessObject.ExtractProperty("Name")); bool applied = false; property.FilterApplied += delegate { applied = true; }; property.ApplyFilter(null); Assert.IsTrue(applied); }