@@ -88,6 +88,7 @@ public async Task CreateAsync()
8888 public async Task UpdatePropertiesAsync ( )
8989 {
9090 var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
91+ var propertyId = "{>U;" ;
9192 var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
9293
9394 var jsonData = await File . ReadAllTextAsync ( "data/pages/UpdatePagePropertiesResponse.json" ) ;
@@ -99,6 +100,10 @@ public async Task UpdatePropertiesAsync()
99100 . WithBody ( jsonData )
100101 ) ;
101102
103+ Server . Given ( CreateGetRequestBuilder ( ApiEndpoints . PagesApiUrls . RetrievePropertyItem ( pageId , propertyId ) ) )
104+ . RespondWith (
105+ Response . Create ( ) . WithStatusCode ( 200 ) . WithBody ( "{\" object\" :\" property_item\" ,\" id\" :\" {>U;\" ,\" type\" :\" checkbox\" ,\" checkbox\" :true}" ) ) ;
106+
102107 var updatedProperties = new Dictionary < string , PropertyValue > ( )
103108 {
104109 { "In stock" , new CheckboxPropertyValue ( ) { Checkbox = true } }
@@ -110,7 +115,7 @@ public async Task UpdatePropertiesAsync()
110115 page . Properties . Should ( ) . HaveCount ( 2 ) ;
111116 var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
112117
113- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
118+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
114119 {
115120 PageId = page . Id ,
116121 PropertyId = updatedProperty . Value . Id
@@ -142,6 +147,7 @@ public async Task PageObjectShouldHaveUrlProperty()
142147 public async Task UpdatePageAsync ( )
143148 {
144149 var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
150+ var propertyId = "{>U;" ;
145151 var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
146152
147153 var jsonData = await File . ReadAllTextAsync ( "data/pages/UpdatePagePropertiesResponse.json" ) ;
@@ -153,6 +159,10 @@ public async Task UpdatePageAsync()
153159 . WithBody ( jsonData )
154160 ) ;
155161
162+ Server . Given ( CreateGetRequestBuilder ( ApiEndpoints . PagesApiUrls . RetrievePropertyItem ( pageId , propertyId ) ) )
163+ . RespondWith (
164+ Response . Create ( ) . WithStatusCode ( 200 ) . WithBody ( "{\" object\" :\" property_item\" ,\" id\" :\" {>U;\" ,\" type\" :\" checkbox\" ,\" checkbox\" :true}" ) ) ;
165+
156166 var pagesUpdateParameters = new PagesUpdateParameters
157167 {
158168 Properties = new Dictionary < string , PropertyValue > ( )
@@ -168,7 +178,7 @@ public async Task UpdatePageAsync()
168178 page . Properties . Should ( ) . HaveCount ( 2 ) ;
169179 var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
170180
171- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
181+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
172182 {
173183 PageId = page . Id ,
174184 PropertyId = updatedProperty . Value . Id
@@ -181,6 +191,8 @@ public async Task UpdatePageAsync()
181191 public async Task ArchivePageAsync ( )
182192 {
183193 var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
194+ var propertyId = "{>U;" ;
195+
184196 var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
185197
186198 var jsonData = await File . ReadAllTextAsync ( "data/pages/ArchivePageResponse.json" ) ;
@@ -192,6 +204,10 @@ public async Task ArchivePageAsync()
192204 . WithBody ( jsonData )
193205 ) ;
194206
207+ Server . Given ( CreateGetRequestBuilder ( ApiEndpoints . PagesApiUrls . RetrievePropertyItem ( pageId , propertyId ) ) )
208+ . RespondWith (
209+ Response . Create ( ) . WithStatusCode ( 200 ) . WithBody ( "{\" object\" :\" property_item\" ,\" id\" :\" {>U;\" ,\" type\" :\" checkbox\" ,\" checkbox\" :true}" ) ) ;
210+
195211 var pagesUpdateParameters = new PagesUpdateParameters
196212 {
197213 Archived = true ,
@@ -208,7 +224,7 @@ public async Task ArchivePageAsync()
208224 page . Properties . Should ( ) . HaveCount ( 2 ) ;
209225 var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
210226
211- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
227+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
212228 {
213229 PageId = page . Id ,
214230 PropertyId = updatedProperty . Value . Id
0 commit comments