Skip to content

Commit bb7187f

Browse files
committed
Experiment with using TUnit instead of xUnit
Remaining issues * TUnit provides a very basic [GitHub summary reporter][1] out of the box, but the more feature complete GitHubActionsTestLogger is currently [not supported for Microsoft.Testing.Platform][2] * HTML logger: could not find an equivalent for Microsoft.Testing.Platform * Stryker: currently [not supported for Microsoft.Testing.Platform][3] [1]: https://github.com/thomhurst/TUnit/blob/f857682f30e767df0f352fc2f5218c6fb5127ed3/TUnit.Engine/Reporters/GitHubReporter.cs [2]: Tyrrrz/GitHubActionsTestLogger#41 [3]: stryker-mutator/stryker-net#3094
1 parent 691b85b commit bb7187f

6 files changed

+124
-147
lines changed

.github/workflows/continuous-integration.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: matrix.os == 'ubuntu-latest' && env.CODECOV_TOKEN != ''
7171
uses: codecov/codecov-action@v5
7272
with:
73-
files: coverage/*/coverage.cobertura.xml
73+
files: coverage/*/*.cobertura.xml
7474
token: ${{ env.CODECOV_TOKEN }}
7575
- name: ☂️ Upload coverage report to Codacy
7676
env:
@@ -79,7 +79,7 @@ jobs:
7979
uses: codacy/codacy-coverage-reporter-action@v1
8080
with:
8181
project-token: ${{ env.CODACY_PROJECT_TOKEN }}
82-
coverage-reports: coverage/*/coverage.cobertura.xml
82+
coverage-reports: coverage/*/*.cobertura.xml
8383
- name: 📦 Create NuGet package
8484
run: dotnet pack --no-build --output .
8585
- name: 📤 Upload NuGet package artifact
@@ -91,7 +91,7 @@ jobs:
9191
- name: 👽 Run mutation tests and upload report to Stryker dashboard
9292
env:
9393
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
94-
if: matrix.os == 'ubuntu-latest' && env.STRYKER_DASHBOARD_API_KEY != ''
94+
if: matrix.os == 'DISABLED' && env.STRYKER_DASHBOARD_API_KEY != ''
9595
run: |
9696
dotnet tool restore
9797
dotnet tool run dotnet-stryker --reporter dashboard --open-report:dashboard --version ${GITHUB_REF_NAME} --dashboard-api-key ${{ env.STRYKER_DASHBOARD_API_KEY }}

tests/IndentationSettingsTest.cs

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
using System;
22
using FluentAssertions;
3-
using Xunit;
43

54
namespace Serilog.Formatting.Log4Net.Tests;
65

76
public class IndentationSettingsTest
87
{
9-
[Theory]
10-
[InlineData(Indentation.Space, 2, " ")]
11-
[InlineData(Indentation.Tab, 2, "\t\t")]
12-
[InlineData(Indentation.Space, 4, " ")]
13-
[InlineData(Indentation.Tab, 4, "\t\t\t\t")]
8+
[Test]
9+
[Arguments(Indentation.Space, (byte)2, " ")]
10+
[Arguments(Indentation.Tab, (byte)2, "\t\t")]
11+
[Arguments(Indentation.Space, (byte)4, " ")]
12+
[Arguments(Indentation.Tab, (byte)4, "\t\t\t\t")]
1413
public void IndentationSettingsToString(Indentation indentation, byte size, string expectedString)
1514
{
1615
// Arrange
@@ -23,7 +22,7 @@ public void IndentationSettingsToString(Indentation indentation, byte size, stri
2322
indentationString.Should().Be(expectedString);
2423
}
2524

26-
[Fact]
25+
[Test]
2726
public void InvalidIndentation()
2827
{
2928
// Act
@@ -34,7 +33,7 @@ public void InvalidIndentation()
3433
.Which.Message.Should().StartWith("The value of argument 'indentation' (-1) is invalid for enum type 'Indentation'.");
3534
}
3635

37-
[Fact]
36+
[Test]
3837
public void InvalidSize()
3938
{
4039
// Act

tests/LineEndingTest.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using System;
22
using FluentAssertions;
3-
using Xunit;
43

54
namespace Serilog.Formatting.Log4Net.Tests;
65

76
public class LineEndingTest
87
{
9-
[Fact]
8+
[Test]
109
public void InvalidLineEnding()
1110
{
1211
Action action = () => _ = new Log4NetTextFormatter(c => c.UseLineEnding((LineEnding)4));

0 commit comments

Comments
 (0)