use of org.apache.maven.surefire.util.RunOrderCalculator in project junit5 by junit-team.
the class JUnitPlatformProviderTests method providerParametersMock.
private static ProviderParameters providerParametersMock(RunListener runListener, TestListResolver testListResolver, Class<?>... testClasses) {
TestsToRun testsToRun = newTestsToRun(testClasses);
ScanResult scanResult = mock(ScanResult.class);
when(scanResult.applyFilter(any(), any())).thenReturn(testsToRun);
RunOrderCalculator runOrderCalculator = mock(RunOrderCalculator.class);
when(runOrderCalculator.orderTestClasses(any())).thenReturn(testsToRun);
ReporterFactory reporterFactory = mock(ReporterFactory.class);
when(reporterFactory.createReporter()).thenReturn(runListener);
TestRequest testRequest = mock(TestRequest.class);
when(testRequest.getTestListResolver()).thenReturn(testListResolver);
ProviderParameters providerParameters = mock(ProviderParameters.class);
when(providerParameters.getScanResult()).thenReturn(scanResult);
when(providerParameters.getRunOrderCalculator()).thenReturn(runOrderCalculator);
when(providerParameters.getReporterFactory()).thenReturn(reporterFactory);
when(providerParameters.getTestRequest()).thenReturn(testRequest);
return providerParameters;
}
Aggregations