@@ -172,15 +172,14 @@ public void DiscoverTests(
172172 // We can't use await here because the contract from VSTest says we have to wait for everything to finish
173173 // before returning from this function.
174174 DiscoverTests (
175- sources , loggerHelper , testPlatformContext , runSettings ,
175+ sources , loggerHelper , runSettings ,
176176 ( source , discoverer , discoveryOptions ) => new VsDiscoverySink ( source , loggerHelper , discoverySink , discoveryOptions , testPlatformContext , testCaseFilter , ( ) => cancelled )
177177 ) . GetAwaiter ( ) . GetResult ( ) ;
178178 }
179179
180180 async Task DiscoverTests < TVisitor > (
181181 IEnumerable < string > sources ,
182182 LoggerHelper logger ,
183- TestPlatformContext testPlatformContext ,
184183 RunSettings runSettings ,
185184 Func < string , IFrontControllerDiscoverer , ITestFrameworkDiscoveryOptions , TVisitor > visitorFactory ,
186185 Action < string , IFrontControllerDiscoverer , ITestFrameworkDiscoveryOptions , TVisitor > ? visitComplete = null )
@@ -343,7 +342,7 @@ internal static IRunnerReporter GetRunnerReporter(
343342 return reporter ?? new DefaultRunnerReporter ( ) ;
344343 }
345344
346- static IList < DiscoveredTestCase > GetVsTestCases (
345+ static List < DiscoveredTestCase > GetVsTestCases (
347346 string source ,
348347 VsExecutionDiscoverySink visitor ,
349348 LoggerHelper logger ,
@@ -393,12 +392,11 @@ public void RunTests(
393392 RunTests (
394393 runContext , frameworkHandle , logger , testPlatformContext , runSettings ,
395394 ( ) =>
396- tests
395+ [ .. tests
397396 . Distinct ( TestCaseUniqueIDComparer . Instance )
398397 . GroupBy ( testCase => testCase . Source )
399398 . Select ( group => AssemblyRunInfo . Create ( logger , project , runSettings , group . Key , [ .. group ] , runExplicitTests ) )
400- . WhereNotNull ( )
401- . ToList ( )
399+ . WhereNotNull ( ) ]
402400 ) . GetAwaiter ( ) . GetResult ( ) ;
403401 }
404402
@@ -428,7 +426,7 @@ public void RunTests(
428426 // before returning from this function.
429427 RunTests (
430428 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 ( ) ]
432430 ) . GetAwaiter ( ) . GetResult ( ) ;
433431 }
434432
0 commit comments