Skip to content

Commit 50e403b

Browse files
committed
Experiment with using TUnit instead of xUnit
Remaining issues * GitHub action: how to replace GitHubActionsTestLogger? See microsoft/testfx#4365 * HTML logger: could not find an equivalent for Microsoft.Testing.Platform * Stryker: currently not supported for Microsoft.Testing.Platform, see stryker-mutator/stryker-net#3094
1 parent a437307 commit 50e403b

5 files changed

+112
-135
lines changed

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)