Exemplo n.º 1
0
        public void TestWithFields(string name, bool result)
        {
            var filter = new SearcherFilter(SearcherContext.Graph).WithFields(typeof(FakeObject));
            var data   = new FieldSearcherItemData(typeof(FakeObject).GetField(name));

            Assert.AreEqual(result, filter.ApplyFilters(data));
        }
Exemplo n.º 2
0
        public void TestWithFieldsOfDeclaringAndFieldTypes(string fieldName, Type declaringType, Type fieldType,
                                                           bool result)
        {
            var filter = new SearcherFilter(SearcherContext.Graph).WithFields(declaringType, fieldType);
            var data   = new FieldSearcherItemData(typeof(FakeObject).GetField(fieldName));

            Assert.AreEqual(result, filter.ApplyFilters(data));
        }