mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
27 lines
474 B
C#
27 lines
474 B
C#
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);
|
|
}
|
|
}
|