Exemplo n.º 1
0
        /// <summary>
        /// Gets the matching test member 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 TestMember GetTestMember(string fullyQualifiedName)
        {
            string className = TestMember.GetQualifiedClassName(fullyQualifiedName);

            if (className != null)
            {
                if (Contains(className))
                {
                    TestClass testClass  = this[className];
                    string    memberName = TestMember.GetMemberName(fullyQualifiedName);
                    if (memberName != null)
                    {
                        return(testClass.GetTestMember(memberName));
                    }
                }
                else
                {
                    LoggingService.Debug("TestClass not found: " + className);
                }
            }
            else
            {
                LoggingService.Debug("Invalid test member name: " + fullyQualifiedName);
            }
            return(null);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the test class from the specified test result.
 /// </summary>
 TestClass GetTestClassFromTestMemberName(string memberName)
 {
     if (memberName != null)
     {
         string className = TestMember.GetQualifiedClassName(memberName);
         if (className != null)
         {
             if (Contains(className))
             {
                 return(this[className]);
             }
             else
             {
                 LoggingService.Debug("TestClass not found: " + className);
                 return(GetTestClassFromTestMemberName(className));
             }
         }
         else
         {
             LoggingService.Debug("Invalid TestMember.Name: " + memberName);
         }
     }
     return(null);
 }