/// <summary> /// Starts the process of running all the xUnit.net v1 tests in the assembly. /// </summary> /// <param name="messageSink">The message sink to report results back to.</param> public void Run(IMessageSink messageSink) { var discoverySink = new TestDiscoveryVisitor(); toDispose.Push(discoverySink); Find(false, discoverySink); discoverySink.Finished.WaitOne(); Run(discoverySink.TestCases, messageSink); }
/// <inheritdoc/> public virtual void Run(IEnumerable <ITestCase> testMethods, IMessageSink messageSink) { var controller = InnerController; // Call this first so he gets disposed AFTER the discovery sink if (testMethods == null) { var discoverySink = new TestDiscoveryVisitor(); toDispose.Push(discoverySink); controller.Find(false, discoverySink); discoverySink.Finished.WaitOne(); testMethods = discoverySink.TestCases; } controller.Run(testMethods, messageSink); }