File tree Expand file tree Collapse file tree
GoogleTestAdapter/Core/TestResults Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,24 +196,7 @@ private TestCase FindTestcase(string qualifiedTestname)
196196
197197 public static TestCase FindTestcase ( string qualifiedTestname , IList < TestCase > testCasesRun )
198198 {
199- foreach ( TestCase tc in testCasesRun )
200- {
201- // If namespace exists then remove it so we can compare the test display names.
202- // Using just tc.DisplayName does not work for paramaterized test cases.
203- string fullyQualifiedName = tc . FullyQualifiedName ;
204- int frequency = fullyQualifiedName . Where ( x => ( x == '.' ) ) . Count ( ) ;
205- if ( frequency > 1 )
206- {
207- fullyQualifiedName = fullyQualifiedName . Substring ( fullyQualifiedName . IndexOf ( '.' ) + 1 ) ;
208- }
209-
210- if ( fullyQualifiedName == qualifiedTestname )
211- {
212- return tc ;
213- }
214- }
215-
216- return null ;
199+ return testCasesRun . SingleOrDefault ( tc => tc . FullyQualifiedName == qualifiedTestname ) ;
217200 }
218201
219202 public static bool IsRunLine ( string line )
You can’t perform that action at this time.
0 commit comments