-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build up the docfx site and create a package README
- Loading branch information
Showing
9 changed files
with
180 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Features | ||
|
||
TODO | ||
* Report tests as skipped instead of as pass or fail when the inputs, the operating system, or other factors render the test invalid or not applicable. | ||
* A test result can be "Skipped" based on a runtime check within the test, an attribute on the test method, or a throwing one or more particular exceptions. | ||
* Support for skipping facts or individual test cases in theories. | ||
* Optionally provide the reason for a test being skipped for inclusion in the test log. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[*.cs] | ||
|
||
# SA1123: Do not place regions within elements | ||
dotnet_diagnostic.SA1123.severity = none | ||
|
||
# SA1124: Do not use regions | ||
dotnet_diagnostic.SA1124.severity = none | ||
|
||
# SA1133: Do not combine attributes | ||
dotnet_diagnostic.SA1133.severity = silent | ||
|
||
# SA1200: Using directives should be placed correctly | ||
dotnet_diagnostic.SA1200.severity = none | ||
|
||
# SA1201: Elements should appear in the correct order | ||
dotnet_diagnostic.SA1201.severity = silent | ||
|
||
# SA1205: Partial elements should declare access | ||
dotnet_diagnostic.SA1205.severity = none | ||
|
||
# SA1400: Access modifier should be declared | ||
dotnet_diagnostic.SA1400.severity = none | ||
|
||
# SA1402: File may only contains a single type | ||
dotnet_diagnostic.SA1402.severity = none | ||
|
||
# SA1403: File may only contain a single namespace | ||
dotnet_diagnostic.SA1403.severity = none | ||
|
||
# SA1502: Element should not be on a single line | ||
dotnet_diagnostic.SA1502.severity = none | ||
|
||
# SA1515: Single-line comment should be preceded by blank line | ||
dotnet_diagnostic.SA1515.severity = none | ||
|
||
# SA1516: Elements should be separated by blank line | ||
dotnet_diagnostic.SA1516.severity = none | ||
|
||
# SA1600: Elements should be documented | ||
dotnet_diagnostic.SA1600.severity = silent | ||
|
||
# SA1601: Partial elements should be documented | ||
dotnet_diagnostic.SA1601.severity = silent | ||
|
||
# SA1649: File name should match first type name | ||
dotnet_diagnostic.SA1649.severity = none | ||
|
||
# IDE0051: Remove unused private members | ||
dotnet_diagnostic.IDE0051.severity = none | ||
|
||
# CS1591: Missing XML comment for publicly visible type or member | ||
dotnet_diagnostic.CS1591.severity = silent | ||
|
||
# CA1822: Mark members as static | ||
dotnet_diagnostic.CA1822.severity = silent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) Andrew Arnott. All rights reserved. | ||
// Licensed under the Microsoft Public License (Ms-PL). See LICENSE.txt file in the project root for full license information. | ||
|
||
using System.Runtime.InteropServices; | ||
using System.Runtime.Versioning; | ||
using System.Security.Cryptography; | ||
using Xunit; | ||
|
||
public class GettingStarted | ||
{ | ||
#region RuntimeCheck | ||
[SkippableFact] | ||
public void RuntimeCheck() | ||
{ | ||
Skip.IfNot(Environment.GetEnvironmentVariable("RunThisTest") == "true"); | ||
} | ||
#endregion | ||
|
||
#region ThrownExceptions | ||
[SkippableFact(typeof(NotSupportedException), typeof(NotImplementedException))] | ||
public void TestFunctionalityWhichIsNotSupportedOnSomePlatforms() | ||
{ | ||
// Test functionality. If it throws any of the exceptions listed in the attribute, | ||
// a skip result is reported instead of a failure. | ||
} | ||
#endregion | ||
|
||
#region OSCheck | ||
[SkippableFact, SupportedOSPlatform("Windows")] | ||
public void TestCngKey() | ||
{ | ||
var key = CngKey.Create(CngAlgorithm.Rsa); | ||
Assert.NotNull(key); | ||
} | ||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\src\Xunit.SkippableFact\Xunit.SkippableFact.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="xunit" /> | ||
<PackageReference Include="xunit.runner.visualstudio" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Xunit.SkippableFact | ||
|
||
This library 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. | ||
|
||
Use `[SkippableFact]` or `[SkippableTheory]` to make a test skippable. | ||
|
||
[Learn more at our documentation site](https://aarnott.github.io/Xunit.SkippableFact/). |