Esempio n. 1
0
        /// <summary>
        /// Creates test tooltip.
        /// </summary>
        /// <param name="testInfo">Test information</param>
        /// <param name="testResult">Information from the last test run.</param>
        /// <returns>Tooltip for test node.</returns>
        string CreateTestTooltip(TestInfo testInfo, TestResult testResult)
        {
            string testName         = testInfo.Name;
            string requirementLevel = testInfo.GetRequirementString();
            string state            = "NOT PERFORMED";

            if (testResult != null)
            {
                if (testResult.Log.TestStatus == TestStatus.NotSupported)
                {
                    state = "NOT SUPPORTED";
                }
                else
                {
                    state = testResult.Log.TestStatus.ToString().ToUpper();
                }
            }

            //string tooltip = string.Format("{0}\r\nRequirement Level: {1} \r\nState: {2}",
            //    testName, requirementLevel, state);

            string functionalityUnderTest = testInfo.GetFunctionalityString();

            string tooltip = string.Format("{0}\r\n{1} \r\nFunctionality under test: {2}\r\nState: {3}",
                                           testName, requirementLevel, functionalityUnderTest, state);


            return(tooltip);
        }