diff --git a/README.md b/README.md index 1ed7d45..dcefc1d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ Xunit.SkippableFact This project allows for Xunit tests that can determine during execution that they should report a "skipped" result. This can be useful when a precondition is not satisfied, or the test is over functionality that does not exist on the platform being tested. +This package targets Xunit v2. +Xunit v3 has skipping built-in. +See [our Xunit v3 migration doc](https://aarnott.github.io/Xunit.SkippableFact/docs/xunit-v3.html). + ## Installation This project is available as a [NuGet package][NuPkg] diff --git a/docfx/docfx.json b/docfx/docfx.json index 1c94779..7a7f716 100644 --- a/docfx/docfx.json +++ b/docfx/docfx.json @@ -1,48 +1,53 @@ { - "metadata": [ - { - "src": [ - { - "src": "../src/Xunit.SkippableFact", - "files": [ - "**/*.csproj" - ] - } - ], - "dest": "api" - } - ], - "build": { - "content": [ - { - "files": [ - "**/*.{md,yml}" - ], - "exclude": [ - "_site/**" - ] - } - ], - "resource": [ - { - "files": [ - "images/**" - ] - } - ], - "xref": [ - "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" - ], - "output": "_site", - "template": [ - "default", - "modern" - ], - "globalMetadata": { - "_appName": "Xunit.SkippableFact", - "_appTitle": "Xunit.SkippableFact", - "_enableSearch": true, - "pdf": false - } - } + "metadata": [ + { + "src": [ + { + "src": "../src/Xunit.SkippableFact", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "xref": [ + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" + ], + "output": "_site", + "template": [ + "default", + "modern" + ], + "globalMetadata": { + "_appName": "Xunit.SkippableFact", + "_appTitle": "Xunit.SkippableFact", + "_enableSearch": true, + "pdf": false + }, + "markdownEngineProperties": { + "markdigExtensions": [ + "footnotes" + ] + } + } } diff --git a/docfx/docs/toc.yml b/docfx/docs/toc.yml index 36a3802..40c333b 100644 --- a/docfx/docs/toc.yml +++ b/docfx/docs/toc.yml @@ -2,4 +2,4 @@ href: features.md - name: Getting Started href: getting-started.md - +- href: xunit-v3.md diff --git a/docfx/docs/xunit-v3.md b/docfx/docs/xunit-v3.md new file mode 100644 index 0000000..e9c0c9d --- /dev/null +++ b/docfx/docs/xunit-v3.md @@ -0,0 +1,16 @@ +# Xunit v3 Migration + +Xunit v3 has skipping built-in, so there is no need for Xunit.SkippableFact. +As part of upgrading from Xunit v2 to v3, you should remove your package reference on Xunit.SkippableFact. + +The following provides a guide for switching your use of Xunit.SkippableFact to Xunit v3 when you update your Xunit dependency. + +Xunit.SkippableFact API | Xunit v3 API +--|-- +@Xunit.Skip.If* | Assert.SkipWhen +@Xunit.Skip.IfNot* | Assert.SkipUnless +@Xunit.SkipException | Xunit.Sdk.SkipException +@Xunit.SkippableFactAttribute | Xunit.FactAttribute[^1] +@Xunit.SkippableTheoryAttribute | Xunit.TheoryAttribute[^1] + +[^1]: Xunit's built-in attributes are sufficient. Although they lack the ability to take a list of exception types that should produce a Skipped result. This [may come in the future](https://github.com/xunit/xunit/issues/3101). diff --git a/docfx/toc.yml b/docfx/toc.yml index abd17b8..aa254f7 100644 --- a/docfx/toc.yml +++ b/docfx/toc.yml @@ -2,3 +2,5 @@ href: docs/ - name: API href: api/ +- name: GitHub + href: https://github.com/AArnott/Xunit.SkippableFact