GetNavigationData() public method

public GetNavigationData ( string typeName, string methodName ) : Xunit.DiaNavigationData
typeName string
methodName string
return Xunit.DiaNavigationData
Beispiel #1
0
        /// <inheritdoc/>
        public (string?sourceFile, int?sourceLine) GetSourceInformation(
            string?testClassName,
            string?testMethodName)
        {
            var navData = default(DiaNavigationData?);

            if (testClassName != null && testMethodName != null)
            {
                navData = session.GetNavigationData(testClassName, testMethodName);
            }

            return(navData?.FileName, navData?.LineNumber);
        }
        /// <inheritdoc/>
        public SourceInformation GetSourceInformation(ITestCase testCase)
        {
            var navData = session.GetNavigationData(testCase.Class.Name, testCase.Method.Name);

            if (navData == null)
            {
                return(EmptySourceInformation);
            }

            return(new SourceInformation
            {
                FileName = navData.FileName,
                LineNumber = navData.LineNumber
            });
        }
Beispiel #3
0
        /// <inheritdoc/>
        public _ISourceInformation GetSourceInformation(
            string?testClassName,
            string?testMethodName)
        {
            var navData = default(DiaNavigationData?);

            if (testClassName != null && testMethodName != null)
            {
                navData = session.GetNavigationData(testClassName, testMethodName);
            }

            if (navData == null)
            {
                return(EmptySourceInformation);
            }

            return(new _SourceInformation
            {
                FileName = navData.FileName,
                LineNumber = navData.LineNumber
            });
        }