diff options
Diffstat (limited to '')
| -rw-r--r-- | src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs new file mode 100644 index 00000000..b692c912 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs | |||
| @@ -0,0 +1,23 @@ | |||
| 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 | |||
| 3 | namespace WixBuildTools.TestSupport.XunitExtensions | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using Xunit.Abstractions; | ||
| 7 | using Xunit.Sdk; | ||
| 8 | |||
| 9 | public class SkippableFactDiscoverer : IXunitTestCaseDiscoverer | ||
| 10 | { | ||
| 11 | private IMessageSink DiagnosticMessageSink { get; } | ||
| 12 | |||
| 13 | public SkippableFactDiscoverer(IMessageSink diagnosticMessageSink) | ||
| 14 | { | ||
| 15 | this.DiagnosticMessageSink = diagnosticMessageSink; | ||
| 16 | } | ||
| 17 | |||
| 18 | public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) | ||
| 19 | { | ||
| 20 | yield return new SkippableFactTestCase(this.DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), discoveryOptions.MethodDisplayOptionsOrDefault(), testMethod); | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
