Skip to content

Commit 5231ed1

Browse files
Use IAsyncDisposable in Comments client tests
1 parent 66d75a4 commit 5231ed1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Test/Notion.IntegrationTests/CommentsClientTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Notion.IntegrationTests;
99

10-
public class CommentsClientTests : IntegrationTestBase, IDisposable
10+
public class CommentsClientTests : IntegrationTestBase, IAsyncDisposable
1111
{
1212
private readonly Page _page;
1313

@@ -17,12 +17,12 @@ public CommentsClientTests()
1717
PagesCreateParametersBuilder.Create(
1818
new ParentPageInput { PageId = ParentPageId }
1919
).Build()
20-
).Result;
20+
).GetAwaiter().GetResult();
2121
}
2222

23-
public void Dispose()
23+
public async ValueTask DisposeAsync()
2424
{
25-
Client.Pages.UpdateAsync(_page.Id, new PagesUpdateParameters { Archived = true }).Wait();
25+
await Client.Pages.UpdateAsync(_page.Id, new PagesUpdateParameters { Archived = true });
2626
}
2727

2828
[Fact]

0 commit comments

Comments
 (0)