コード例 #1
0
        internal static void Go(string fileName, Stream stream)
        {
            using (AssemblyHelper.SubscribeResolve())
            using (var xunit = new XunitFrontController(
                AppDomainSupport.Denied,
                assemblyFileName: fileName,
                diagnosticMessageSink: new MessageVisitor(),
                shadowCopy: false))
            using (var writer = new ClientWriter(stream))
            using (var impl = new Impl(xunit, writer))
            {
                xunit.Find(includeSourceInformation: false, messageSink: impl, discoveryOptions: TestFrameworkOptions.ForDiscovery());
                impl.Finished.WaitOne();

                writer.Write(TestDataKind.EndOfData);
            }
        }
コード例 #2
0
 internal Impl(ITestFrameworkDiscoverer discoverer, ClientWriter writer)
 {
     Finished = new ManualResetEvent(false);
     _discoverer = discoverer;
     _writer = writer;
 }