Skip to content

Commit e0ec167

Browse files
authored
Add skippable facts support to installer tests (#121)
1 parent 887a2d7 commit e0ec167

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@
5858
<PackageVersion Include="Zafiro.FileSystem.Local" Version="41.2.1" />
5959
<PackageVersion Include="Zafiro.DivineBytes" Version="41.2.4" />
6060
<PackageVersion Include="DiscUtils" Version="0.16.13" />
61+
<PackageVersion Include="Xunit.SkippableFact" Version="1.5.23" />
6162
</ItemGroup>
6263
</Project>

src/DotnetPackaging.Exe.Tests/DotnetPackaging.Exe.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" />
1616
<PackageReference Include="xunit" />
1717
<PackageReference Include="xunit.runner.visualstudio" />
18+
<PackageReference Include="Xunit.SkippableFact" />
1819
</ItemGroup>
1920

2021
<ItemGroup>

src/DotnetPackaging.Exe.Tests/SimpleExePackerTests.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
using DotnetPackaging.Exe.Installer.Core;
88
using FluentAssertions;
99
using Xunit;
10-
using Xunit.Sdk;
1110

1211
namespace DotnetPackaging.Exe.Tests;
1312

1413
public class SimpleExePackerTests
1514
{
16-
[Fact]
15+
[SkippableFact]
1716
public async Task Should_Create_Valid_Uninstaller_By_Stripping_Payload()
1817
{
1918
Skip.IfNot(OperatingSystem.IsWindows(), "Installer stub is Windows-only.");
@@ -77,7 +76,7 @@ public async Task Should_Create_Valid_Uninstaller_By_Stripping_Payload()
7776
try { Directory.Delete(tempDir.FullName, true); } catch { }
7877
}
7978

80-
[Fact]
79+
[SkippableFact]
8180
public async Task Should_Extract_Payload_Correctly_From_Installer()
8281
{
8382
Skip.IfNot(OperatingSystem.IsWindows(), "Installer stub is Windows-only.");
@@ -140,7 +139,7 @@ public async Task Should_Extract_Payload_Correctly_From_Installer()
140139
try { Directory.Delete(tempDir.FullName, true); } catch { }
141140
}
142141

143-
[Fact]
142+
[SkippableFact]
144143
public async Task Installer_build_should_produce_bootable_executable()
145144
{
146145
Skip.IfNot(OperatingSystem.IsWindows(), "Installer stub is Windows-only.");
@@ -181,7 +180,7 @@ public async Task Installer_build_should_produce_bootable_executable()
181180
try { Directory.Delete(tempDir.FullName, true); } catch { }
182181
}
183182

184-
[Fact]
183+
[SkippableFact]
185184
public async Task Uninstaller_should_be_stripped_and_bootable()
186185
{
187186
Skip.IfNot(OperatingSystem.IsWindows(), "Installer stub is Windows-only.");
@@ -235,7 +234,7 @@ public async Task Uninstaller_should_be_stripped_and_bootable()
235234
try { Directory.Delete(tempDir.FullName, true); } catch { }
236235
}
237236

238-
[Fact]
237+
[SkippableFact]
239238
public async Task Dispatcher_failures_should_be_logged()
240239
{
241240
Skip.IfNot(OperatingSystem.IsWindows(), "Installer stub is Windows-only.");

0 commit comments

Comments
 (0)