Skip to content

Commit

Permalink
Final cleanup and ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenaw committed Oct 29, 2023
1 parent eefa8f0 commit 911581d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/NUnitFramework/framework/Internal/DisposeHelper.cs
@@ -1,8 +1,10 @@
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt

using System;
#if NETFRAMEWORK
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
#endif

namespace NUnit.Framework.Internal
{
Expand Down Expand Up @@ -43,6 +45,7 @@ public static void EnsureDisposed(object? value)
}
}

#if NETFRAMEWORK
private static bool TryGetAsyncDispose(Type type, [NotNullWhen(true)] out MethodInfo? method)
{
method = null;
Expand All @@ -54,5 +57,6 @@ private static bool TryGetAsyncDispose(Type type, [NotNullWhen(true)] out Method
method = asyncDisposable.GetMethod("DisposeAsync", Type.EmptyTypes);
return method is not null;
}
#endif
}
}
Expand Up @@ -7,7 +7,6 @@
using NUnit.Framework.Internal.Commands;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal.Extensions;
using System.Linq;

namespace NUnit.Framework.Internal.Execution
{
Expand Down
1 change: 0 additions & 1 deletion src/NUnitFramework/testdata/LifeCycleFixture.cs
Expand Up @@ -433,7 +433,6 @@ public void Dispose()
public void VerifyDisposed() => Assert.That(DisposeCount, Is.EqualTo(1));
}


[TestFixture]
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)]
public class InstancePerTestCaseWithAsyncDisposeTestCase : IAsyncDisposable
Expand Down
1 change: 0 additions & 1 deletion src/NUnitFramework/testdata/OneTimeSetUpTearDownData.cs
Expand Up @@ -483,7 +483,6 @@ public void Dispose()
}
}


[TestFixture]
public class AsyncDisposableFixture : IAsyncDisposable
{
Expand Down

0 comments on commit 911581d

Please sign in to comment.