Skip to content

Commit 66d75a4

Browse files
User IAsyncDisposable in PageClient tests
1 parent 0813c02 commit 66d75a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Test/Notion.IntegrationTests/PageClientTests.cs

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

99
namespace Notion.IntegrationTests;
1010

11-
public class PageClientTests : IntegrationTestBase, IDisposable
11+
public class PageClientTests : IntegrationTestBase, IAsyncDisposable
1212
{
1313
private readonly Page _page;
1414
private readonly Database _database;
@@ -20,7 +20,7 @@ public PageClientTests()
2020
PagesCreateParametersBuilder.Create(
2121
new ParentPageInput { PageId = ParentPageId }
2222
).Build()
23-
).Result;
23+
).GetAwaiter().GetResult();
2424

2525
// Create a database
2626
var createDbRequest = new DatabasesCreateParameters
@@ -61,9 +61,9 @@ public PageClientTests()
6161
_database = Client.Databases.CreateAsync(createDbRequest).GetAwaiter().GetResult();
6262
}
6363

64-
public void Dispose()
64+
public async ValueTask DisposeAsync()
6565
{
66-
Client.Pages.UpdateAsync(_page.Id, new PagesUpdateParameters { Archived = true }).GetAwaiter().GetResult();
66+
await Client.Pages.UpdateAsync(_page.Id, new PagesUpdateParameters { Archived = true });
6767
}
6868

6969
[Fact]

0 commit comments

Comments
 (0)