/// <summary> /// Retrieves a list of the test methods from the test class. /// </summary> /// <param name="type">The type to be inspected</param> /// <returns>The test methods</returns> public static IEnumerable <IMethodInfo> GetTestMethods(ITypeInfo type) { foreach (IMethodInfo method in type.GetMethods()) { if (MethodUtility.IsTest(method)) { yield return(method); } } }
/// <summary> /// Determines if a given <see cref="IMethodInfo"/> refers to a test method. /// </summary> /// <param name="testMethod">The test method to validate</param> /// <returns>True if the method is a test method; false, otherwise</returns> public bool IsTestMethod(IMethodInfo testMethod) { return(MethodUtility.IsTest(testMethod)); }