private static VsTestCase Convert(
            ITestCase testcase,
            string shortName,
            string fullyQualifiedName,
            bool uniquifyNames)
        {
            string uniqueName;
            if (uniquifyNames)
                uniqueName = string.Format("{0}({1})", fullyQualifiedName, testcase.UniqueID);
            else
                uniqueName = fullyQualifiedName;

            var result = new VsTestCase();
            result.DisplayName = shortName;
            result.FullyQualifiedName = uniqueName;

            result.Id = GuidFromString(testcase.UniqueID);

            if (testcase.SourceInformation != null)
            {
                result.CodeFilePath = testcase.SourceInformation.FileName;
                result.LineNumber = testcase.SourceInformation.LineNumber;
            }

            return result;
        }
Example #2
0
        static VsTestCase Convert(ITestCase testcase, string shortName, string fullyQualifiedName, bool uniquifyNames)
        {
            string uniqueName;

            if (uniquifyNames)
            {
                uniqueName = string.Format("{0}({1})", fullyQualifiedName, testcase.UniqueID);
            }
            else
            {
                uniqueName = fullyQualifiedName;
            }

            var result = new VsTestCase();

            result.DisplayName        = shortName;
            result.FullyQualifiedName = uniqueName;

            result.Id = GuidFromString(testcase.UniqueID);

            if (testcase.SourceInformation != null)
            {
                result.CodeFilePath = testcase.SourceInformation.FileName;
                result.LineNumber   = testcase.SourceInformation.LineNumber;
            }

            return(result);
        }