Beispiel #1
0
        public EditorTestInfo(TestMethod testMethod)
        {
            this.methodName     = testMethod.get_MethodName();
            this.fullMethodName = testMethod.Method.ToString();
            this.className      = testMethod.get_FixtureType().Name;
            this.fullClassName  = testMethod.get_ClassName();
            this.Namespace      = testMethod.Method.ReflectedType.Namespace;
            this.fullName       = testMethod.get_TestName().get_FullName();
            this.paramName      = ExtractMethodCallParametersString(this.fullName);
            this.id             = testMethod.get_TestName().get_TestID().GetHashCode().ToString();
            List <string> list = testMethod.get_Categories().Cast <string>().ToList <string>();

            if (testMethod.get_Parent().get_Categories().Count > 0)
            {
                list.AddRange(testMethod.get_Parent().get_Categories().Cast <string>());
            }
            if (testMethod.get_Parent() is ParameterizedMethodSuite)
            {
                list.AddRange(testMethod.get_Parent().get_Parent().get_Categories().Cast <string>());
            }
            this.categories   = list.ToArray();
            this.assemblyPath = this.GetAssemblyPath(testMethod);
            this.isIgnored    = testMethod.get_RunState() == 4;
        }