File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Test/Notion.IntegrationTests Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public async Task Test_RetrievePagePropertyItemAsync()
142142
143143 var listProperty = ( ListPropertyItem ) property ;
144144
145- listProperty . Type . Should ( ) . BeNull ( ) ;
145+ listProperty . Type . Should ( ) . NotBeNull ( ) ;
146146 listProperty . Results . Should ( ) . SatisfyRespectively ( p =>
147147 {
148148 p . Should ( ) . BeOfType < TitlePropertyItem > ( ) ;
@@ -202,7 +202,11 @@ public async Task Test_UpdatePageProperty_with_date_as_null()
202202
203203 var page = await _client . Pages . CreateAsync ( pagesCreateParameters ) ;
204204
205- var setDate = page . Properties [ datePropertyName ] as DatePropertyValue ;
205+ var setDate = ( DatePropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
206+ {
207+ PageId = page . Id ,
208+ PropertyId = page . Properties [ datePropertyName ] . Id
209+ } ) ;
206210
207211 setDate ? . Date ? . Start . Should ( ) . Be ( Convert . ToDateTime ( "2020-12-08T12:00:00Z" ) ) ;
208212
@@ -215,7 +219,11 @@ public async Task Test_UpdatePageProperty_with_date_as_null()
215219 Properties = testProps
216220 } ) ;
217221
218- var verifyDate = updatedPage . Properties [ datePropertyName ] as DatePropertyValue ;
222+ var verifyDate = ( DatePropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
223+ {
224+ PageId = page . Id ,
225+ PropertyId = updatedPage . Properties [ datePropertyName ] . Id
226+ } ) ;
219227
220228 verifyDate ? . Date . Should ( ) . BeNull ( ) ;
221229
You can’t perform that action at this time.
0 commit comments