@@ -32,7 +32,9 @@ public void GenerateCurl_For_PostMethod()
3232 // Assert
3333 script . Should ( ) . NotBeNullOrEmpty ( ) ;
3434 script . Should ( ) . StartWith ( "curl -X POST" ) ;
35- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""sara"",""requestId"":10001001,""amount"":20000}'" ) ;
35+ script . Trim ( ) . Should ( )
36+ . BeEquivalentTo (
37+ @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""sara"",""requestId"":10001001,""amount"":20000}'" ) ;
3638 }
3739
3840 [ Theory ]
@@ -59,7 +61,9 @@ public void GenerateCurl_With_ContentLength_For_PostMethod()
5961 // Assert
6062 script . Should ( ) . NotBeNullOrEmpty ( ) ;
6163 script . Should ( ) . StartWith ( "curl -X POST" ) ;
62- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer f69406a4-6b62-4734-a8dc-158f0fc308ab' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""sara"",""requestId"":10001001,""amount"":20000}'" ) ;
64+ script . Trim ( ) . Should ( )
65+ . BeEquivalentTo (
66+ @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer f69406a4-6b62-4734-a8dc-158f0fc308ab' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""sara"",""requestId"":10001001,""amount"":20000}'" ) ;
6367 }
6468
6569 [ Theory ]
@@ -90,7 +94,9 @@ public void GenerateCurl_With_QueryString_For_PostMethod()
9094
9195 script . Should ( ) . NotBeNullOrEmpty ( ) ;
9296 script . Should ( ) . StartWith ( "curl -X POST" ) ;
93- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test?id=12 -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""amin"",""requestId"":10001000,""amount"":10000}'" ) ;
97+ script . Trim ( ) . Should ( )
98+ . BeEquivalentTo (
99+ @"curl -X POST http://localhost:1213/v1/api/test?id=12 -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""amin"",""requestId"":10001000,""amount"":10000}'" ) ;
94100 }
95101
96102 [ Theory ]
@@ -121,7 +127,9 @@ public void GenerateCurl_UrlEncoded_For_PostMethod()
121127 // Assert
122128 script . Should ( ) . NotBeNullOrEmpty ( ) ;
123129 script . Should ( ) . StartWith ( "curl -X POST" ) ;
124- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/x-www-form-urlencoded' -d 'session=703438f3-16ad-4ba5-b923-8f72cd0f2db9' -d 'payload={""name"":""justin"",""requestId"":10001026,""amount"":26000}'" ) ;
130+ script . Trim ( ) . Should ( )
131+ . BeEquivalentTo (
132+ @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/x-www-form-urlencoded' -d 'session=703438f3-16ad-4ba5-b923-8f72cd0f2db9' -d 'payload={""name"":""justin"",""requestId"":10001026,""amount"":26000}'" ) ;
125133 }
126134
127135 [ Theory ]
@@ -145,7 +153,9 @@ public void GenerateCurl_Without_RequestBody_For_PostMethod()
145153 // Assert
146154 script . Should ( ) . NotBeNullOrEmpty ( ) ;
147155 script . Should ( ) . StartWith ( "curl -X POST" ) ;
148- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer c332e9a1-1e0e-44c2-b819-b0e7e8ff7d45' -H 'Content-Type: application/json; charset=utf-8' -d ''" ) ;
156+ script . Trim ( ) . Should ( )
157+ . BeEquivalentTo (
158+ @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer c332e9a1-1e0e-44c2-b819-b0e7e8ff7d45' -H 'Content-Type: application/json; charset=utf-8' -d ''" ) ;
149159 }
150160
151161 [ Theory ]
@@ -171,7 +181,7 @@ public void GenerateCurl_Without_Content_For_PostMethod()
171181 script . Should ( ) . StartWith ( "curl -X POST" ) ;
172182 script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 56bfa7a0-0541-4d71-9efc-8b28219ac31a' -d ''" ) ;
173183 }
174-
184+
175185 [ Theory ]
176186 public void GenerateCurl_When_Invalid_JsonBody_PostMethod ( )
177187 {
@@ -195,7 +205,9 @@ public void GenerateCurl_When_Invalid_JsonBody_PostMethod()
195205 // Assert
196206 script . Should ( ) . NotBeNullOrEmpty ( ) ;
197207 script . Should ( ) . StartWith ( "curl -X POST" ) ;
198- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '""name"":""steven"",""requestId"":10001005,""amount"":60000'" ) ;
208+ script . Trim ( ) . Should ( )
209+ . BeEquivalentTo (
210+ @"curl -X POST http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '""name"":""steven"",""requestId"":10001005,""amount"":60000'" ) ;
199211 }
200212
201213 [ Theory ]
@@ -221,9 +233,11 @@ public void GenerateCurl_When_BaseAddress_Is_Null_PostMethod()
221233 // Assert
222234 script . Should ( ) . NotBeNullOrEmpty ( ) ;
223235 script . Should ( ) . StartWith ( "curl -X POST" ) ;
224- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X POST -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""nancy"",""requestId"":10001006,""amount"":70000}'" ) ;
236+ script . Trim ( ) . Should ( )
237+ . BeEquivalentTo (
238+ @"curl -X POST -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""nancy"",""requestId"":10001006,""amount"":70000}'" ) ;
225239 }
226-
240+
227241 [ Theory ]
228242 public void GenerateCurl_For_GetMethod ( )
229243 {
@@ -245,7 +259,9 @@ public void GenerateCurl_For_GetMethod()
245259 // Assert
246260 script . Should ( ) . NotBeNullOrEmpty ( ) ;
247261 script . Should ( ) . StartWith ( "curl" ) ;
248- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl http://localhost:1213/v1/api/test -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
262+ script . Trim ( ) . Should ( )
263+ . BeEquivalentTo (
264+ @"curl http://localhost:1213/v1/api/test -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
249265 }
250266
251267 [ Theory ]
@@ -273,8 +289,11 @@ public void GenerateCurl_With_QueryString_For_GetMethod()
273289 // Assert
274290 script . Should ( ) . NotBeNullOrEmpty ( ) ;
275291 script . Should ( ) . StartWith ( "curl" ) ;
276- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl http://localhost:1213/v1/api/test?id=12 -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
292+ script . Trim ( ) . Should ( )
293+ . BeEquivalentTo (
294+ @"curl http://localhost:1213/v1/api/test?id=12 -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
277295 }
296+
278297 [ Theory ]
279298 public void GenerateCurl_For_PutMethod ( )
280299 {
@@ -298,7 +317,9 @@ public void GenerateCurl_For_PutMethod()
298317 // Assert
299318 script . Should ( ) . NotBeNullOrEmpty ( ) ;
300319 script . Should ( ) . StartWith ( "curl -X PUT" ) ;
301- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X PUT http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""reza"",""requestId"":10001002,""amount"":30000}'" ) ;
320+ script . Trim ( ) . Should ( )
321+ . BeEquivalentTo (
322+ @"curl -X PUT http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""reza"",""requestId"":10001002,""amount"":30000}'" ) ;
302323 }
303324
304325 [ Theory ]
@@ -324,7 +345,9 @@ public void GenerateCurl_For_PatchMethod()
324345 // Assert
325346 script . Should ( ) . NotBeNullOrEmpty ( ) ;
326347 script . Should ( ) . StartWith ( "curl -X PATCH" ) ;
327- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X PATCH http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""hamed"",""requestId"":10001003,""amount"":40000}'" ) ;
348+ script . Trim ( ) . Should ( )
349+ . BeEquivalentTo (
350+ @"curl -X PATCH http://localhost:1213/v1/api/test -H 'Authorization: Bearer 4797c126-3f8a-454a-aff1-96c0220dae61' -H 'Content-Type: application/json; charset=utf-8' -d '{""name"":""hamed"",""requestId"":10001003,""amount"":40000}'" ) ;
328351 }
329352
330353 [ Theory ]
@@ -349,6 +372,8 @@ public void GenerateCurl_For_DeleteMethod()
349372 // Assert
350373 script . Should ( ) . NotBeNullOrEmpty ( ) ;
351374 script . Should ( ) . StartWith ( "curl -X DELETE" ) ;
352- script . Trim ( ) . Should ( ) . BeEquivalentTo ( @"curl -X DELETE http://localhost:1213/v1/api/test/12 -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
375+ script . Trim ( ) . Should ( )
376+ . BeEquivalentTo (
377+ @"curl -X DELETE http://localhost:1213/v1/api/test/12 -H 'Authorization: Bearer 703438f3-16ad-4ba5-b923-8f72cd0f2db9' -H 'Content-Type: application/json; charset=utf-8'" ) ;
353378 }
354- }
379+ }
0 commit comments