Skip to content

Commit 6086a89

Browse files
Prevent Windows-specific unit tests from running on Ubuntu by disabling them.
Add missing file
1 parent 9bb82e3 commit 6086a89

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Runtime.InteropServices;
2+
using Xunit;
3+
4+
namespace DotNetUnitTest
5+
{
6+
public sealed class WindowsOnlyFactAttribute : FactAttribute
7+
{
8+
public WindowsOnlyFactAttribute()
9+
{
10+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
11+
{
12+
Skip = "Test skipped because it runs only on Windows.";
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)