File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Test/Notion.IntegrationTests Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 88
99namespace Notion . IntegrationTests ;
1010
11- public class PageClientTests : IntegrationTestBase , IAsyncDisposable
11+ public class PageClientTests : IntegrationTestBase , IAsyncLifetime
1212{
13- private readonly Page _page ;
14- private readonly Database _database ;
13+ private Page _page = null ! ;
14+ private Database _database = null ! ;
1515
16- public PageClientTests ( )
16+ public async Task InitializeAsync ( )
1717 {
1818 // Create a page
19- _page = Client . Pages . CreateAsync (
19+ _page = await Client . Pages . CreateAsync (
2020 PagesCreateParametersBuilder . Create (
2121 new ParentPageInput { PageId = ParentPageId }
2222 ) . Build ( )
23- ) . GetAwaiter ( ) . GetResult ( ) ;
23+ ) ;
2424
2525 // Create a database
2626 var createDbRequest = new DatabasesCreateParameters
@@ -58,10 +58,10 @@ public PageClientTests()
5858 Parent = new ParentPageInput { PageId = _page . Id }
5959 } ;
6060
61- _database = Client . Databases . CreateAsync ( createDbRequest ) . GetAwaiter ( ) . GetResult ( ) ;
61+ _database = await Client . Databases . CreateAsync ( createDbRequest ) ;
6262 }
6363
64- public async ValueTask DisposeAsync ( )
64+ public async Task DisposeAsync ( )
6565 {
6666 await Client . Pages . UpdateAsync ( _page . Id , new PagesUpdateParameters { Archived = true } ) ;
6767 }
You can’t perform that action at this time.
0 commit comments