public void ReturnsMethodWithGivenType() { Assert.Same(selected, members.Method(methodType)); MethodTypeFilter filter = VerifyFilter(selection, methodType); Assert.Same(methods, filter.Source); }
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()); }
public void ReturnsMethodWithGivenType() { Assert.Same(selected, testType.Method(methodType)); MethodTypeFilter typed = VerifyFilter(selection, methodType); VerifyStaticMethods(typed.Source, testType); }
public void ReturnsMethodWithGivenType() { Assert.Same(selected, instance.Method(methodType)); MethodTypeFilter named = VerifyFilter(selection, methodType); VerifyInstanceMethods(named.Source, instance); }
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); }
public void ReturnsGenericMethodOfGivenType() { Method <MethodType> generic = testType.Method <MethodType>(); VerifyGenericMethod(selected, generic); MethodTypeFilter typed = VerifyFilter(selection, typeof(MethodType)); VerifyStaticMethods(typed.Source, testType); }
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); }
public void ReturnsGenericMethodOfGivenType() { Method <MethodType> generic = instance.Method <MethodType>(); VerifyGenericMethod(selected, generic); MethodTypeFilter typed = VerifyFilter(selection, typeof(MethodType)); VerifyInstanceMethods(typed.Source, instance); }
public void ReturnsGenericMethodWithGivenType() { Method <MethodType> generic = members.Method <MethodType>(); VerifyGenericMethod(selected, generic); MethodTypeFilter typeFilter = VerifyFilter(selection, typeof(MethodType)); Assert.Same(methods, typeFilter.Source); }
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); }
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); }