Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }