コード例 #1
0
            public void ReturnsMethodWithGivenType()
            {
                Assert.Same(selected, members.Method(methodType));
                MethodTypeFilter filter = VerifyFilter(selection, methodType);

                Assert.Same(methods, filter.Source);
            }
コード例 #2
0
        public static Method Method(this IMembers members, Type methodType, string methodName)
        {
            var typed = new MethodTypeFilter(members.Methods(), methodType, methodFactory);
            var named = new MemberNameFilter <Method, MethodInfo>(typed, methodName);

            return(named.Single());
        }
コード例 #3
0
            public void ReturnsMethodWithGivenType()
            {
                Assert.Same(selected, testType.Method(methodType));

                MethodTypeFilter typed = VerifyFilter(selection, methodType);

                VerifyStaticMethods(typed.Source, testType);
            }
コード例 #4
0
            public void ReturnsMethodWithGivenType()
            {
                Assert.Same(selected, instance.Method(methodType));

                MethodTypeFilter named = VerifyFilter(selection, methodType);

                VerifyInstanceMethods(named.Source, instance);
            }
コード例 #5
0
            public void ReturnsMethodWithGivenTypeAndName()
            {
                Assert.Same(selected, members.Method(methodType, methodName));
                MemberNameFilter <Method, MethodInfo> nameFilter = VerifyFilter(selection, methodName);
                MethodTypeFilter typeFilter = VerifyFilter(nameFilter.Source, methodType);

                Assert.Same(methods, typeFilter.Source);
            }
コード例 #6
0
            public void ReturnsGenericMethodOfGivenType()
            {
                Method <MethodType> generic = testType.Method <MethodType>();

                VerifyGenericMethod(selected, generic);
                MethodTypeFilter typed = VerifyFilter(selection, typeof(MethodType));

                VerifyStaticMethods(typed.Source, testType);
            }
コード例 #7
0
            public void ReturnsMethodWithGivenTypeAndName()
            {
                Assert.Same(selected, testType.Method(methodType, methodName));

                MemberNameFilter <Method, MethodInfo> named = VerifyFilter(selection, methodName);
                MethodTypeFilter typed = VerifyFilter(named.Source, methodType);

                VerifyStaticMethods(typed.Source, testType);
            }
コード例 #8
0
            public void ReturnsGenericMethodOfGivenType()
            {
                Method <MethodType> generic = instance.Method <MethodType>();

                VerifyGenericMethod(selected, generic);
                MethodTypeFilter typed = VerifyFilter(selection, typeof(MethodType));

                VerifyInstanceMethods(typed.Source, instance);
            }
コード例 #9
0
            public void ReturnsGenericMethodWithGivenType()
            {
                Method <MethodType> generic = members.Method <MethodType>();

                VerifyGenericMethod(selected, generic);
                MethodTypeFilter typeFilter = VerifyFilter(selection, typeof(MethodType));

                Assert.Same(methods, typeFilter.Source);
            }
コード例 #10
0
            public void ReturnsGenericMethodWithGivenTypeAndName()
            {
                Method <MethodType> generic = testType.Method <MethodType>(methodName);

                VerifyGenericMethod(selected, generic);
                MemberNameFilter <Method, MethodInfo> named = VerifyFilter(selection, methodName);
                MethodTypeFilter typed = VerifyFilter(named.Source, typeof(MethodType));

                VerifyStaticMethods(typed.Source, testType);
            }
コード例 #11
0
            public void ReturnsGenericMethodWithGivenTypeAndName()
            {
                Method <MethodType> generic = members.Method <MethodType>(methodName);

                VerifyGenericMethod(selected, generic);
                MemberNameFilter <Method, MethodInfo> nameFilter = VerifyFilter(selection, methodName);
                MethodTypeFilter typeFilter = VerifyFilter(nameFilter.Source, methodType);

                Assert.Same(methods, typeFilter.Source);
            }