mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Add test on a trx report where the className attribute of TestMethod is missing
This reproduces issue #556
This commit is contained in:
parent
18430db883
commit
d1504ea554
11 changed files with 131 additions and 20 deletions
|
|
@ -0,0 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<OutputType>exe</OutputType>
|
||||
<DeterministicSourcePaths>true</DeterministicSourcePaths>
|
||||
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.7.3" />
|
||||
<PackageReference Include="xunit.v3" Version="2.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
27
reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs
Normal file
27
reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace DotnetTests.XUnitV3Tests;
|
||||
|
||||
public sealed class Fixture : IDisposable
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
throw new InvalidOperationException("Failure during fixture disposal");
|
||||
}
|
||||
}
|
||||
|
||||
public class FixtureTests(Fixture fixture) : IClassFixture<Fixture>
|
||||
{
|
||||
[Fact]
|
||||
public void Passing_Test()
|
||||
{
|
||||
Assert.NotNull(fixture);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Failing_Test()
|
||||
{
|
||||
Assert.Null(fixture);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue