// 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 Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) { yield return new SkippableFactTestCase(this.DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), discoveryOptions.MethodDisplayOptionsOrDefault(), testMethod); } } }