AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.06k stars 2.25k forks source link

NUnit [TearDown] not called when using [AvaloniaTest] #17475

Open Tom-RedCactus opened 2 weeks ago

Tom-RedCactus commented 2 weeks ago

Describe the bug

The teardown method is not called when I run a [AvaloniaTest].

To Reproduce

image
[TestFixture]
public class TearDownTest
{
    [TearDown]
    public void TearDown()
    {
        Assert.Fail();
    }

    [AvaloniaTest]
    public void AvaloniaTest()
    {
        Assert.Pass();
    }

    [Test]
    public void NUnitTest()
    {
        Assert.Pass();
    }
}

Expected behavior

That the Teardown will be called after a [AvaloniaTest].

Avalonia version

3.13.3, 4.2.2

OS

Windows, macOS

Additional context

No response