@@ -88,6 +88,7 @@ public async Task CreateAsync()
88
88
public async Task UpdatePropertiesAsync ( )
89
89
{
90
90
var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
91
+ var propertyId = "{>U;" ;
91
92
var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
92
93
93
94
var jsonData = await File . ReadAllTextAsync ( "data/pages/UpdatePagePropertiesResponse.json" ) ;
@@ -99,6 +100,10 @@ public async Task UpdatePropertiesAsync()
99
100
. WithBody ( jsonData )
100
101
) ;
101
102
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
+
102
107
var updatedProperties = new Dictionary < string , PropertyValue > ( )
103
108
{
104
109
{ "In stock" , new CheckboxPropertyValue ( ) { Checkbox = true } }
@@ -110,7 +115,7 @@ public async Task UpdatePropertiesAsync()
110
115
page . Properties . Should ( ) . HaveCount ( 2 ) ;
111
116
var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
112
117
113
- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
118
+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
114
119
{
115
120
PageId = page . Id ,
116
121
PropertyId = updatedProperty . Value . Id
@@ -142,6 +147,7 @@ public async Task PageObjectShouldHaveUrlProperty()
142
147
public async Task UpdatePageAsync ( )
143
148
{
144
149
var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
150
+ var propertyId = "{>U;" ;
145
151
var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
146
152
147
153
var jsonData = await File . ReadAllTextAsync ( "data/pages/UpdatePagePropertiesResponse.json" ) ;
@@ -153,6 +159,10 @@ public async Task UpdatePageAsync()
153
159
. WithBody ( jsonData )
154
160
) ;
155
161
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
+
156
166
var pagesUpdateParameters = new PagesUpdateParameters
157
167
{
158
168
Properties = new Dictionary < string , PropertyValue > ( )
@@ -168,7 +178,7 @@ public async Task UpdatePageAsync()
168
178
page . Properties . Should ( ) . HaveCount ( 2 ) ;
169
179
var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
170
180
171
- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
181
+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
172
182
{
173
183
PageId = page . Id ,
174
184
PropertyId = updatedProperty . Value . Id
@@ -181,6 +191,8 @@ public async Task UpdatePageAsync()
181
191
public async Task ArchivePageAsync ( )
182
192
{
183
193
var pageId = "251d2b5f-268c-4de2-afe9-c71ff92ca95c" ;
194
+ var propertyId = "{>U;" ;
195
+
184
196
var path = ApiEndpoints . PagesApiUrls . UpdateProperties ( pageId ) ;
185
197
186
198
var jsonData = await File . ReadAllTextAsync ( "data/pages/ArchivePageResponse.json" ) ;
@@ -192,6 +204,10 @@ public async Task ArchivePageAsync()
192
204
. WithBody ( jsonData )
193
205
) ;
194
206
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
+
195
211
var pagesUpdateParameters = new PagesUpdateParameters
196
212
{
197
213
Archived = true ,
@@ -208,7 +224,7 @@ public async Task ArchivePageAsync()
208
224
page . Properties . Should ( ) . HaveCount ( 2 ) ;
209
225
var updatedProperty = page . Properties . First ( x => x . Key == "In stock" ) ;
210
226
211
- var checkboxPropertyValue = ( CheckboxPropertyValue ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
227
+ var checkboxPropertyValue = ( CheckboxPropertyItem ) await _client . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
212
228
{
213
229
PageId = page . Id ,
214
230
PropertyId = updatedProperty . Value . Id
0 commit comments