Example #1
0
        public void Should_filter_out_get_property_methods()
        {
            var factory     = new ContextTypeFactory(new ExtensionMethodHandler(new AssemblyRegistry()));
            var contextType = factory.GetWrapper(typeof(TypeWithProperty));

            contextType.MemberMatchers.Any(x => x.MemberInfo.Name == "get_Foo").ShouldEqual(false);
        }
Example #2
0
        private IEnumerable <StepDefinition> GetStepsForType(Type type, int levels, Predicate <IMemberMatcher> include)
        {
            var wrapper  = _typeFactory.GetWrapper(type);
            var matchers = wrapper.MemberMatchers.Where(x => include(x));

            return(matchers.Select(memberMatcher => BuildStepDefinition(type, memberMatcher, levels)));
        }