summaryrefslogtreecommitdiff
path: root/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-11-08 14:58:05 -0800
committerRob Mensching <rob@firegiant.com>2022-11-08 16:20:25 -0800
commitc843b47d6233153fa961c6d0e61edf7cedf255bb (patch)
tree9eae6badd42d3badb8665b7414b4d44ca48d6ae1 /src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs
parent7e498d6348c26583972ea1cdf7d51dadc8f5b792 (diff)
downloadwix-c843b47d6233153fa961c6d0e61edf7cedf255bb.tar.gz
wix-c843b47d6233153fa961c6d0e61edf7cedf255bb.tar.bz2
wix-c843b47d6233153fa961c6d0e61edf7cedf255bb.zip
Separate WixInternal content from official WixToolset namespace
Diffstat (limited to 'src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs')
-rw-r--r--src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs
deleted file mode 100644
index 3299fe7e..00000000
--- a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs
+++ /dev/null
@@ -1,41 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixBuildTools.TestSupport.XunitExtensions
4{
5 using System;
6 using System.ComponentModel;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using Xunit.Abstractions;
10 using Xunit.Sdk;
11
12 public class SkippableTheoryTestCase : XunitTheoryTestCase
13 {
14 [EditorBrowsable(EditorBrowsableState.Never)]
15 [Obsolete("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")]
16 public SkippableTheoryTestCase() { }
17
18 public SkippableTheoryTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod)
19 : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod)
20 {
21 }
22
23 public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
24 IMessageBus messageBus,
25 object[] constructorArguments,
26 ExceptionAggregator aggregator,
27 CancellationTokenSource cancellationTokenSource)
28 {
29 // Duplicated code from SkippableFactTestCase. I'm sure we could find a way to de-dup with some thought.
30 var skipMessageBus = new SkippableFactMessageBus(messageBus);
31 var result = await base.RunAsync(diagnosticMessageSink, skipMessageBus, constructorArguments, aggregator, cancellationTokenSource);
32 if (skipMessageBus.DynamicallySkippedTestCount > 0)
33 {
34 result.Failed -= skipMessageBus.DynamicallySkippedTestCount;
35 result.Skipped += skipMessageBus.DynamicallySkippedTestCount;
36 }
37
38 return result;
39 }
40 }
41}