@@ -224,6 +224,15 @@ Public Function Specs() As SpecSuite
224
224
.Expect(Request.FormattedResource).ToEqual "A/B/C/D"
225
225
End With
226
226
227
+ With Specs.It("FormattedResource should url-encode Url Segments" )
228
+ Set Request = New WebRequest
229
+
230
+ Request.Resource = "{segment}"
231
+ Request.AddUrlSegment "segment" , "$&+,/:;=?@"
232
+
233
+ .Expect(Request.FormattedResource).ToEqual "%24%26%2B%2C%2F%3A%3B%3D%3F%40"
234
+ End With
235
+
227
236
With Specs.It("FormattedResource should include querystring parameters" )
228
237
Set Request = New WebRequest
229
238
@@ -302,24 +311,6 @@ Public Function Specs() As SpecSuite
302
311
.Expect(Request.Body).ToEqual "{""A"":123,""B"":456}"
303
312
End With
304
313
305
- ' TODO
306
- 'With Specs.It("AddBodyParameter should throw TODO if adding to existing Body this is not Dictionary")
307
- ' On Error Resume Next
308
- ' Set Request = New WebRequest
309
- '
310
- ' Request.Body = Array("A", "B", "C")
311
- ' Request.AddBodyParameter "D", 123
312
- '
313
- ' ' TODO Check actual error number
314
- ' .Expect(Err.Number).ToNotEqual 0
315
- ' Debug.Print Err.Number & ": " & Err.Description
316
- ' .Expect(Err.Description).ToEqual _
317
- ' "The existing body is not a Dictionary. Adding body parameters can only be used with Dictionaries"
318
- '
319
- ' Err.Clear
320
- ' On Error GoTo 0
321
- 'End With
322
-
323
314
' AddCookie
324
315
' --------------------------------------------- '
325
316
With Specs.It("should AddCookie" )
0 commit comments