예제 #1
0
        public override async Task <RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
                                                         IMessageBus messageBus,
                                                         object[] constructorArguments,
                                                         ExceptionAggregator aggregator,
                                                         CancellationTokenSource cancellationTokenSource)
        {
            var skipMessageBus = new SkippableFactMessageBus(messageBus, constructorArguments);
            var result         = await base.RunAsync(diagnosticMessageSink, skipMessageBus, constructorArguments, aggregator, cancellationTokenSource);

            if (skipMessageBus.DynamicallySkippedTestCount > 0)
            {
                result.Failed  -= skipMessageBus.DynamicallySkippedTestCount;
                result.Skipped += skipMessageBus.DynamicallySkippedTestCount;
            }

            return(result);
        }
        public override async Task <RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
                                                         IMessageBus messageBus,
                                                         object[] constructorArguments,
                                                         ExceptionAggregator aggregator,
                                                         CancellationTokenSource cancellationTokenSource)
        {
            // Duplicated code from SkippableFactTestCase. I'm sure we could find a way to de-dup with some thought.
            var skipMessageBus = new SkippableFactMessageBus(messageBus, constructorArguments);
            var result         = await base.RunAsync(diagnosticMessageSink, skipMessageBus, constructorArguments, aggregator, cancellationTokenSource);

            if (skipMessageBus.DynamicallySkippedTestCount > 0)
            {
                result.Failed  -= skipMessageBus.DynamicallySkippedTestCount;
                result.Skipped += skipMessageBus.DynamicallySkippedTestCount;
            }

            return(result);
        }