From 0dd9ae77de240e3e773e80dd216cf975463bb550 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 30 Nov 2024 08:21:17 -0700 Subject: [PATCH] Touch-ups on README --- README.md | 8 ++++---- src/Xunit.SkippableFact/Sdk/TestMethodExtensions.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 18b6fd3..a4f0b0e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ public void TestFunctionalityWhichIsNotSupportedOnSomePlatforms() } ``` -### The [SupportedOSPlatform] attribute +## The `[SupportedOSPlatform]` attribute Since version 1.5, `Xunit.SkippableFact` understands the `SupportedOSPlatform` attribute to skip tests on unsupported platforms. @@ -51,10 +51,10 @@ public void TestCngKey() } ``` -Without `[SupportedOSPlatform("Windows")` the [CA1416](CA1416) code analysis warning would trigger: +Without `[SupportedOSPlatform("Windows")]` the [CA1416][CA1416] code analysis warning would trigger: > This call site is reachable on all platforms. 'CngKey. Create(CngAlgorithm)' is only supported on: 'windows'. -Adding `[SupportedOSPlatform("Windows")` both suppresses this platform compatibility warning and skips the test when running on Linux or macOS. +Adding `[SupportedOSPlatform("Windows")]` both suppresses this platform compatibility warning and skips the test when running on Linux or macOS. [NuPkg]: https://www.nuget.org/packages/Xunit.SkippableFact -[CA1416]: https://learn.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca1416 +[CA1416]: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416 diff --git a/src/Xunit.SkippableFact/Sdk/TestMethodExtensions.cs b/src/Xunit.SkippableFact/Sdk/TestMethodExtensions.cs index 1bb3fcd..e3d0151 100644 --- a/src/Xunit.SkippableFact/Sdk/TestMethodExtensions.cs +++ b/src/Xunit.SkippableFact/Sdk/TestMethodExtensions.cs @@ -16,7 +16,7 @@ internal static class TestMethodExtensions /// /// The . /// A description of the supported platforms if the test can not run on the current platform or if the test can run on the current platform. - public static string? GetPlatformSkipReason(this ITestMethod testMethod) + internal static string? GetPlatformSkipReason(this ITestMethod testMethod) { #if NET462 return null;