Exemple #1
0
        /// <summary>
        /// Gets the matching test method from this set of classes.
        /// </summary>
        /// <param name="fullyQualifiedName">The fully qualified
        /// method name (e.g. Namespace.ClassName.MethodName).</param>
        /// <returns>Null if the method cannot be found.</returns>
        public TestMethod GetTestMethod(string fullyQualifiedName)
        {
            string className = TestMethod.GetQualifiedClassName(fullyQualifiedName);

            if (className != null)
            {
                if (Contains(className))
                {
                    TestClass testClass  = this[className];
                    string    methodName = TestMethod.GetMethodName(fullyQualifiedName);
                    if (methodName != null)
                    {
                        return(testClass.GetTestMethod(methodName));
                    }
                }
                else
                {
                    LoggingService.Debug("TestClass not found: " + className);
                }
            }
            else
            {
                LoggingService.Debug("Invalid test method name: " + fullyQualifiedName);
            }
            return(null);
        }
Exemple #2
0
 /// <summary>
 /// Gets the test class from the specified test result.
 /// </summary>
 TestClass GetTestClassFromTestMethodName(string methodName)
 {
     if (methodName != null)
     {
         string className = TestMethod.GetQualifiedClassName(methodName);
         if (className != null)
         {
             if (Contains(className))
             {
                 return(this[className]);
             }
             else
             {
                 LoggingService.Debug("TestClass not found: " + className);
                 return(GetTestClassFromTestMethodName(className));
             }
         }
         else
         {
             LoggingService.Debug("Invalid TestMethod.Name: " + methodName);
         }
     }
     return(null);
 }