internal ExecutionSummary Run(IReadOnlyList <Type> candidateTypes, Discovery discovery, Execution execution) { bus.Publish(new AssemblyStarted(assembly)); var assemblySummary = new ExecutionSummary(); var stopwatch = Stopwatch.StartNew(); var classDiscoverer = new ClassDiscoverer(discovery); var classRunner = new ClassRunner(bus, discovery, execution); var testClasses = classDiscoverer.TestClasses(candidateTypes); bool isOnlyTestClass = testClasses.Count == 1; foreach (var testClass in testClasses) { var classSummary = classRunner.Run(testClass, isOnlyTestClass); assemblySummary.Add(classSummary); } stopwatch.Stop(); bus.Publish(new AssemblyCompleted(assembly, assemblySummary, stopwatch.Elapsed)); return(assemblySummary); }
void Run(Discovery discovery, Execution execution, Type[] candidateTypes, ExecutionSummary assemblySummary) { var classDiscoverer = new ClassDiscoverer(discovery); var classRunner = new ClassRunner(bus, discovery, execution); var testClasses = classDiscoverer.TestClasses(candidateTypes); bool isOnlyTestClass = testClasses.Count == 1; foreach (var testClass in testClasses) { var classSummary = classRunner.Run(testClass, isOnlyTestClass); assemblySummary.Add(classSummary); } }
ConventionResult Run(Convention convention, Type[] candidateTypes) { var classDiscoverer = new ClassDiscoverer(convention.Config); var conventionResult = new ConventionResult(convention.GetType().FullName); var classRunner = new ClassRunner(listener, convention.Config); foreach (var testClass in classDiscoverer.TestClasses(candidateTypes)) { var classResult = classRunner.Run(testClass); conventionResult.Add(classResult); } return(conventionResult); }
ConventionResult Run(Convention convention, Type[] candidateTypes) { var classDiscoverer = new ClassDiscoverer(convention.Config); var conventionResult = new ConventionResult(convention.GetType().FullName); var classRunner = new ClassRunner(listener, convention.Config); foreach (var testClass in classDiscoverer.TestClasses(candidateTypes)) { var classResult = classRunner.Run(testClass); conventionResult.Add(classResult); } return conventionResult; }