Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
		private static bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry)
		{
			entry.ApplyFilter(filter);
			return entry.MatchesFilter;
		}
Ejemplo n.º 5
0
        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);
        }