Skip to content

Commit

Permalink
dont IDisposable VerifyMSTest VerifyBase
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 12, 2024
1 parent ce47796 commit 5d58f83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649;xUnit1026;xUnit1013;CS1573;VerifyTestsProjectDir;VerifySetParameters</NoWarn>
<Version>24.0.0-beta.1</Version>
<Version>24.0.0-beta.2</Version>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
Expand Down
7 changes: 4 additions & 3 deletions src/Verify.MSTest/VerifyBase.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace VerifyMSTest;

[TestClass]
public abstract partial class VerifyBase :
IDisposable
public abstract partial class VerifyBase
{
static Task AddFile(FilePair path, bool autoVerify)
{
Expand Down Expand Up @@ -129,6 +128,8 @@ SettingsTask Verify(
});
}

public void Dispose() =>
[TestCleanup]
[Experimental("NotForPublicUse")]
public void CleanupTestContext() =>
currentTestContext.Value = null;
}

0 comments on commit 5d58f83

Please sign in to comment.