/// <summary> /// Generates the test links. /// </summary> /// <param name="methodInfos">The method infos.</param> /// <param name="assemblyFullPath">The assembly full path.</param> /// <returns></returns> public List<TestLink> GenerateTestLinks(MethodInfo[] methodInfos, string assemblyFullPath) { List<TestLink> testLinks = new List<TestLink>(); foreach (var currentMethodInfo in methodInfos) { string currentNameSpace = currentMethodInfo.DeclaringType.FullName; string currentTestMethodShortName = currentMethodInfo.Name; string currentTestMethodFullName = String.Concat(currentNameSpace, ".", currentTestMethodShortName); string testId = UnitTestIdGenerator.GuidFromString(currentTestMethodFullName).ToString(); TestLink testLink = new TestLink(currentMethodInfo.Name, currentTestMethodFullName, testId, new FileInfo(assemblyFullPath)); testLinks.Add(testLink); } return testLinks; }
/// <summary> /// Generates the test links. /// </summary> /// <param name="methodInfos">The method infos.</param> /// <param name="assemblyFullPath">The assembly full path.</param> /// <returns></returns> public List <TestLink> GenerateTestLinks(MethodInfo[] methodInfos, string assemblyFullPath) { List <TestLink> testLinks = new List <TestLink>(); foreach (var currentMethodInfo in methodInfos) { string currentNameSpace = currentMethodInfo.DeclaringType.FullName; string currentTestMethodShortName = currentMethodInfo.Name; string currentTestMethodFullName = String.Concat(currentNameSpace, ".", currentTestMethodShortName); string testId = UnitTestIdGenerator.GuidFromString(currentTestMethodFullName).ToString(); TestLink testLink = new TestLink(currentMethodInfo.Name, currentTestMethodFullName, testId, new FileInfo(assemblyFullPath)); testLinks.Add(testLink); } return(testLinks); }