Fix dotnet-trx parsing of tests with custom display names

This commit is contained in:
Michal Dorner 2021-04-20 08:40:05 +02:00
parent 0c4e1654a1
commit 6662b9362e
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
8 changed files with 515 additions and 375 deletions

View file

@ -7,7 +7,7 @@ namespace DotnetTests.XUnitTests
{
public class CalculatorTests
{
private readonly Calculator _calculator = new Calculator();
private readonly Calculator _calculator = new Calculator();
[Fact]
public void Passing_Test()
@ -50,5 +50,21 @@ namespace DotnetTests.XUnitTests
{
throw new Exception("Test");
}
[Theory]
[InlineData(2)]
[InlineData(3)]
public void Is_Even_Number(int i)
{
Assert.True(i % 2 == 0);
}
[Theory(DisplayName = "Should be even number")]
[InlineData(2)]
[InlineData(3)]
public void Theory_With_Custom_Name(int i)
{
Assert.True(i % 2 == 0);
}
}
}