/// <summary> /// Starts the process of finding all tests in an assembly. /// </summary> /// <param name="discoverer">The discoverer.</param> /// <param name="includeSourceInformation">Whether to include source file information, if possible.</param> /// <param name="discoveryMessageSink">The message sink to report results back to.</param> /// <param name="discoveryOptions">The options used by the test framework during discovery.</param> public static void Find(this ITestFrameworkDiscoverer discoverer, bool includeSourceInformation, IMessageSinkWithTypes discoveryMessageSink, ITestFrameworkDiscoveryOptions discoveryOptions) { discoverer.Find(includeSourceInformation, MessageSinkAdapter.Wrap(discoveryMessageSink), discoveryOptions); }
private IEnumerable <ITestCase> GetTestCasesFromDiscoverer(ITestFrameworkDiscoverer discoverer, ITestFrameworkDiscoveryOptions discoveryOptions) { using (discoverer) { var discoverySink = new TestDiscoverySink(); discoverer.Find(false, discoverySink, discoveryOptions); return(discoverySink.GetTestCases().Result); } }
List <ITestCase> GetTestCases(AssemblyRunInfo runInfo, ITestFrameworkDiscoverer discoverer) { string assemblyFileName = runInfo.AssemblyFileName; // Xunit needs the file name var configuration = runInfo.Configuration; var discoveryOptions = TestFrameworkOptions.ForDiscovery(configuration); using (var sink = new TestDiscoverySink()) { discoverer.Find(includeSourceInformation: false, sink, discoveryOptions); sink.Finished.WaitOne(); return(sink.TestCases); } }
/// <summary> /// Starts the process of finding all xUnit.net v2 tests in an assembly. /// </summary> /// <param name="includeSourceInformation">Whether to include source file information, if possible.</param> /// <param name="messageSink">The message sink to report results back to.</param> /// <param name="discoveryOptions">The options used by the test framework during discovery.</param> public void Find(bool includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) { discoverer.Find(includeSourceInformation, CreateOptimizedRemoteMessageSink(messageSink), discoveryOptions); }
/// <summary> /// Starts the process of finding all xUnit.net v2 tests in an assembly. /// </summary> /// <param name="includeSourceInformation">Whether to include source file information, if possible.</param> /// <param name="messageSink">The message sink to report results back to.</param> /// <param name="discoveryOptions">The options used by the test framework during discovery.</param> public void Find(bool includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) { discoverer.Find(includeSourceInformation, messageSink, discoveryOptions); }
/// <summary> /// Starts the process of finding all xUnit.net v2 tests in an assembly. /// </summary> /// <param name="includeSourceInformation">Whether to include source file information, if possible.</param> /// <param name="messageSink">The message sink to report results back to.</param> /// <param name="options">The options used by the test framework during discovery.</param> public void Find(bool includeSourceInformation, IMessageSink messageSink, XunitDiscoveryOptions options) { discoverer.Find(includeSourceInformation, messageSink, options); }
/// <inheritdoc/> public void Find(bool includeSourceInformation, IMessageSink messageSink) { discoverer.Find(includeSourceInformation, messageSink); }