WindowsOnlyTheoryAttribute.cs 531 B

1234567891011121314151617
  1. // Copyright (c) .NET Foundation and contributors. All rights reserved.
  2. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
  3. namespace Microsoft.DotNet.Tools.Test.Utilities
  4. {
  5. public class WindowsOnlyTheoryAttribute : TheoryAttribute
  6. {
  7. public WindowsOnlyTheoryAttribute()
  8. {
  9. if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
  10. {
  11. this.Skip = "This test requires Windows to run";
  12. }
  13. }
  14. }
  15. }