blob: b692c912a940b7c705486e6a64bad800b767e4ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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.
namespace WixBuildTools.TestSupport.XunitExtensions
{
using System.Collections.Generic;
using Xunit.Abstractions;
using Xunit.Sdk;
public class SkippableFactDiscoverer : IXunitTestCaseDiscoverer
{
private IMessageSink DiagnosticMessageSink { get; }
public SkippableFactDiscoverer(IMessageSink diagnosticMessageSink)
{
this.DiagnosticMessageSink = diagnosticMessageSink;
}
public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute)
{
yield return new SkippableFactTestCase(this.DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), discoveryOptions.MethodDisplayOptionsOrDefault(), testMethod);
}
}
}
|