public void TestWithPropertiesOfType(Type type, string name, bool result) { var filter = new SearcherFilter(SearcherContext.Graph).WithProperties(type); var data = new PropertySearcherItemData(typeof(FakeObject).GetProperty(name)); Assert.AreEqual(result, filter.ApplyFilters(data)); }
public void TestWithPropertiesOfDeclaringAndReturnTypes(string propertyName, Type declaringType, Type returnType, bool allowConstant, bool result) { var filter = new SearcherFilter(SearcherContext.Graph).WithProperties(declaringType, returnType, allowConstant); var data = new PropertySearcherItemData(typeof(FakeObject).GetProperty(propertyName)); Assert.AreEqual(result, filter.ApplyFilters(data)); }