ConditionalRunTestOnlyWindows8OrLaterAttribute.cs 607 B

12345678910111213141516
  1. // Copyright (c) .NET Foundation. All rights reserved.
  2. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  3. using System;
  4. using Microsoft.AspNetCore.Cryptography.Cng;
  5. using Microsoft.AspNetCore.Testing.xunit;
  6. namespace Microsoft.AspNetCore.DataProtection.Test.Shared
  7. {
  8. public class ConditionalRunTestOnlyOnWindows8OrLaterAttribute : Attribute, ITestCondition
  9. {
  10. public bool IsMet => OSVersionUtil.IsWindows8OrLater();
  11. public string SkipReason { get; } = "Test requires Windows 8 / Windows Server 2012 or higher.";
  12. }
  13. }