/// <summary> /// Creates a new test method wrapper object. /// </summary> /// <param name="methodInfo">The reflected method.</param> public TestMethod(MethodInfo methodInfo) : this() { _methodInfo = methodInfo; _factAttribute = DynamicAttributeHelper.GetAttribute(this._methodInfo, XUnitTestProvider.FactAttributeName); }
public static ICollection <System.Reflection.MethodInfo> GetTestMethods(Type type) { var c = new List <System.Reflection.MethodInfo>(); foreach (var method in type.GetMethods()) { if (DynamicAttributeHelper.HasAttribute(method, XUnitTestProvider.FactAttributeName)) { c.Add(method); } } return(c); }