@@ -172,15 +172,14 @@ public void DiscoverTests(
172
172
// We can't use await here because the contract from VSTest says we have to wait for everything to finish
173
173
// before returning from this function.
174
174
DiscoverTests (
175
- sources , loggerHelper , testPlatformContext , runSettings ,
175
+ sources , loggerHelper , runSettings ,
176
176
( source , discoverer , discoveryOptions ) => new VsDiscoverySink ( source , loggerHelper , discoverySink , discoveryOptions , testPlatformContext , testCaseFilter , ( ) => cancelled )
177
177
) . GetAwaiter ( ) . GetResult ( ) ;
178
178
}
179
179
180
180
async Task DiscoverTests < TVisitor > (
181
181
IEnumerable < string > sources ,
182
182
LoggerHelper logger ,
183
- TestPlatformContext testPlatformContext ,
184
183
RunSettings runSettings ,
185
184
Func < string , IFrontControllerDiscoverer , ITestFrameworkDiscoveryOptions , TVisitor > visitorFactory ,
186
185
Action < string , IFrontControllerDiscoverer , ITestFrameworkDiscoveryOptions , TVisitor > ? visitComplete = null )
@@ -343,7 +342,7 @@ internal static IRunnerReporter GetRunnerReporter(
343
342
return reporter ?? new DefaultRunnerReporter ( ) ;
344
343
}
345
344
346
- static IList < DiscoveredTestCase > GetVsTestCases (
345
+ static List < DiscoveredTestCase > GetVsTestCases (
347
346
string source ,
348
347
VsExecutionDiscoverySink visitor ,
349
348
LoggerHelper logger ,
@@ -393,12 +392,11 @@ public void RunTests(
393
392
RunTests (
394
393
runContext , frameworkHandle , logger , testPlatformContext , runSettings ,
395
394
( ) =>
396
- tests
395
+ [ .. tests
397
396
. Distinct ( TestCaseUniqueIDComparer . Instance )
398
397
. GroupBy ( testCase => testCase . Source )
399
398
. Select ( group => AssemblyRunInfo . Create ( logger , project , runSettings , group . Key , [ .. group ] , runExplicitTests ) )
400
- . WhereNotNull ( )
401
- . ToList ( )
399
+ . WhereNotNull ( ) ]
402
400
) . GetAwaiter ( ) . GetResult ( ) ;
403
401
}
404
402
@@ -428,7 +426,7 @@ public void RunTests(
428
426
// before returning from this function.
429
427
RunTests (
430
428
runContext , frameworkHandle , logger , testPlatformContext , runSettings ,
431
- ( ) => sources . Select ( source => AssemblyRunInfo . Create ( logger , project , runSettings , Path . GetFullPath ( source ) ) ) . WhereNotNull ( ) . ToList ( )
429
+ ( ) => [ .. sources . Select ( source => AssemblyRunInfo . Create ( logger , project , runSettings , Path . GetFullPath ( source ) ) ) . WhereNotNull ( ) ]
432
430
) . GetAwaiter ( ) . GetResult ( ) ;
433
431
}
434
432
0 commit comments