Example #1
0
 public TestAssemblyRunner(ITestAssembly testAssembly, IEnumerable <IXunitTestCase> testCases, IMessageSink diagnosticMessageSink, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions, TestCaseDeserializerArgs testCaseDeserializerArgs)
     : base(testAssembly, testCases, diagnosticMessageSink, executionMessageSink, executionOptions)
 {
     _testCaseDeserializerArgs = testCaseDeserializerArgs;
     _messageSyncWithEvents    = new MessageSinkWithEvents(executionMessageSink, diagnosticMessageSink);
     ExecutionMessageSink      = _messageSyncWithEvents; // the ExecutionMessageSink is used to create the base message bus
 }
 public TestFrameworkExecutor(AssemblyName assemblyName, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink)
     : base(assemblyName, sourceInformationProvider, diagnosticMessageSink)
 {
     _args = new TestCaseDeserializerArgs
     {
         AssemblyName              = assemblyName,
         DiagnosticMessageSink     = diagnosticMessageSink,
         SourceInformationProvider = sourceInformationProvider
     };
 }
Example #3
0
        public TestCollectionRunner(ITestCollection testCollection, IReadOnlyList <IXunitTestCase> testCases, IMessageSink diagnosticMessageSink, IMessageBus messageBus, ITestCaseOrderer testCaseOrderer, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, IMessageSinkWithEvents meeMessageSinkWithEvents, TestCaseDeserializerArgs testCaseDeserializerArgs, IIsolationBehavior isolationBehavior, Type[] appDomainFixtureTypes, TaskFactory dispositionTaskFactory)
            : base(testCollection, testCases, diagnosticMessageSink, messageBus, testCaseOrderer, aggregator, cancellationTokenSource)
        {
            _meeMessageSinkWithEvents = meeMessageSinkWithEvents;
            _testCaseDeserializerArgs = testCaseDeserializerArgs;
            _appDomainFixtureTypes    = appDomainFixtureTypes;
            _dispositionTaskFactory   = dispositionTaskFactory;

            RunIsolated = isolationBehavior?.IsolateTestCollection(testCollection, testCases) ?? false;
        }
Example #4
0
 public RemoteObjectFactory(AppDomain appDomain, TestCaseDeserializerArgs testCaseDeserializerArgs)
 {
     _appDomain = appDomain;
     _testCaseDeserializerArgs       = testCaseDeserializerArgs;
     _lazyRemoteTestCaseDeserializer = new Lazy <TestCaseDeserializer>(CreateTestCaseDeserializer);
 }
        public IEnumerable <IXunitTestCase> CreateRemoteTestCases(IEnumerable <IXunitTestCase> testCases, TestCaseDeserializerArgs testCaseDeserializerArgs)
        {
            var remoteObjectFactory = new RemoteObjectFactory(_appDomainContext.Domain, testCaseDeserializerArgs);
            var remoteTestCases     = testCases.Select(testCase => (IXunitTestCase)remoteObjectFactory.CreateTestCaseFrom(testCase)).ToArray();

            return(remoteTestCases);
        }