Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        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);
        }