hjhjhjnew 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +55 -0
- data/lib/tester.rb +56 -0
- data/lib/tester/api_helper.rb +261 -0
- data/lib/tester/configuration.rb +66 -0
- data/lib/tester/controllers/base_controller.rb +59 -0
- data/lib/tester/controllers/body_params_controller.rb +1270 -0
- data/lib/tester/controllers/echo_controller.rb +134 -0
- data/lib/tester/controllers/error_codes_controller.rb +179 -0
- data/lib/tester/controllers/form_params_controller.rb +1391 -0
- data/lib/tester/controllers/header_controller.rb +63 -0
- data/lib/tester/controllers/query_param_controller.rb +779 -0
- data/lib/tester/controllers/response_types_controller.rb +717 -0
- data/lib/tester/controllers/template_params_controller.rb +93 -0
- data/lib/tester/exceptions/api_exception.rb +18 -0
- data/lib/tester/exceptions/global_test_exception.rb +32 -0
- data/lib/tester/exceptions/local_test_exception.rb +30 -0
- data/lib/tester/exceptions/nested_model_exception.rb +37 -0
- data/lib/tester/http/faraday_client.rb +55 -0
- data/lib/tester/http/http_call_back.rb +22 -0
- data/lib/tester/http/http_client.rb +92 -0
- data/lib/tester/http/http_context.rb +18 -0
- data/lib/tester/http/http_method_enum.rb +11 -0
- data/lib/tester/http/http_request.rb +48 -0
- data/lib/tester/http/http_response.rb +21 -0
- data/lib/tester/models/additional_model_parameters.rb +70 -0
- data/lib/tester/models/base_model.rb +52 -0
- data/lib/tester/models/boss.rb +129 -0
- data/lib/tester/models/days.rb +30 -0
- data/lib/tester/models/delete_body.rb +52 -0
- data/lib/tester/models/echo_response.rb +88 -0
- data/lib/tester/models/employee.rb +155 -0
- data/lib/tester/models/job.rb +43 -0
- data/lib/tester/models/person.rb +113 -0
- data/lib/tester/models/query_parameter.rb +43 -0
- data/lib/tester/models/server_response.rb +61 -0
- data/lib/tester/models/suite_code.rb +21 -0
- data/lib/tester/models/test_nstring_encoding.rb +52 -0
- data/lib/tester/models/test_r_nstring_encoding.rb +52 -0
- data/lib/tester/models/test_rstring_encoding.rb +52 -0
- data/lib/tester/models/validate.rb +61 -0
- data/lib/tester/tester_client.rb +61 -0
- data/test/controllers/controller_test_base.rb +33 -0
- data/test/controllers/test_body_params_controller.rb +1210 -0
- data/test/controllers/test_echo_controller.rb +29 -0
- data/test/controllers/test_error_codes_controller.rb +47 -0
- data/test/controllers/test_form_params_controller.rb +1099 -0
- data/test/controllers/test_header_controller.rb +30 -0
- data/test/controllers/test_query_param_controller.rb +345 -0
- data/test/controllers/test_response_types_controller.rb +429 -0
- data/test/controllers/test_template_params_controller.rb +47 -0
- data/test/http_response_catcher.rb +16 -0
- data/test/test_helper.rb +91 -0
- metadata +178 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was automatically generated for Stamplay by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
require_relative 'controller_test_base'
|
4
|
+
|
5
|
+
class EchoControllerTests < ControllerTestBase
|
6
|
+
# Called only once for the class before any test has executed
|
7
|
+
def self.startup
|
8
|
+
self.controller = @@api_client.echo
|
9
|
+
end
|
10
|
+
|
11
|
+
# Todo: Add description for test test_json_echo
|
12
|
+
def test_json_echo()
|
13
|
+
# Parameters for the API call
|
14
|
+
input = JSON.parse('{"uid":"1123213","name":"Shahid"}')
|
15
|
+
|
16
|
+
# Perform the API call through the SDK function
|
17
|
+
result = self.class.controller.json_echo(input)
|
18
|
+
|
19
|
+
# Test response code
|
20
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
21
|
+
|
22
|
+
# Test whether the captured response is as we expected
|
23
|
+
assert_not_nil(result)
|
24
|
+
expected_body = JSON.parse('{"body":{"uid":"1123213","name":"Shahid"}}')
|
25
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
26
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# This file was automatically generated for Stamplay by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
require_relative 'controller_test_base'
|
4
|
+
|
5
|
+
class ErrorCodesControllerTests < ControllerTestBase
|
6
|
+
# Called only once for the class before any test has executed
|
7
|
+
def self.startup
|
8
|
+
self.controller = @@api_client.error_codes
|
9
|
+
end
|
10
|
+
|
11
|
+
# Todo: Add description for test test_get_501
|
12
|
+
def test_get_501()
|
13
|
+
|
14
|
+
# Perform the API call through the SDK function
|
15
|
+
assert_raise('NestedModelException'){
|
16
|
+
result = self.class.controller.get_501()
|
17
|
+
}
|
18
|
+
|
19
|
+
# Test response code
|
20
|
+
assert_equal(@response_catcher.response.status_code, 501)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Todo: Add description for test test_get_400
|
24
|
+
def test_get_400()
|
25
|
+
|
26
|
+
# Perform the API call through the SDK function
|
27
|
+
assert_raise('APIException'){
|
28
|
+
result = self.class.controller.get_400()
|
29
|
+
}
|
30
|
+
|
31
|
+
# Test response code
|
32
|
+
assert_equal(@response_catcher.response.status_code, 400)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Todo: Add description for test test_get_500
|
36
|
+
def test_get_500()
|
37
|
+
|
38
|
+
# Perform the API call through the SDK function
|
39
|
+
assert_raise('GlobalTestException'){
|
40
|
+
result = self.class.controller.get_500()
|
41
|
+
}
|
42
|
+
|
43
|
+
# Test response code
|
44
|
+
assert_equal(@response_catcher.response.status_code, 500)
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,1099 @@
|
|
1
|
+
# This file was automatically generated for Stamplay by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
require_relative 'controller_test_base'
|
4
|
+
|
5
|
+
class FormParamsControllerTests < ControllerTestBase
|
6
|
+
# Called only once for the class before any test has executed
|
7
|
+
def self.startup
|
8
|
+
self.controller = @@api_client.form_params
|
9
|
+
end
|
10
|
+
|
11
|
+
# Todo: Add description for test test_delete_form_test
|
12
|
+
def test_delete_form_test()
|
13
|
+
# Parameters for the API call
|
14
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":"farhan","field":"QA"}'))
|
15
|
+
|
16
|
+
# Perform the API call through the SDK function
|
17
|
+
result = self.class.controller.send_delete_form(body)
|
18
|
+
|
19
|
+
# Test response code
|
20
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
21
|
+
|
22
|
+
# Test whether the captured response is as we expected
|
23
|
+
assert_not_nil(result)
|
24
|
+
expected_body = JSON.parse('{"passed":true}')
|
25
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
26
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
27
|
+
end
|
28
|
+
|
29
|
+
# Todo: Add description for test test_delete_form_test_with_multiliner_name
|
30
|
+
def test_delete_form_test_with_multiliner_name()
|
31
|
+
# Parameters for the API call
|
32
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":"farhan\\nnouman","field":"QA"}'))
|
33
|
+
|
34
|
+
# Perform the API call through the SDK function
|
35
|
+
result = self.class.controller.send_delete_form(body)
|
36
|
+
|
37
|
+
# Test response code
|
38
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
39
|
+
|
40
|
+
# Test whether the captured response is as we expected
|
41
|
+
assert_not_nil(result)
|
42
|
+
expected_body = JSON.parse('{"passed":true}')
|
43
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
44
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
45
|
+
end
|
46
|
+
|
47
|
+
# Todo: Add description for test test_delete_form_test_with_special_characters_field
|
48
|
+
def test_delete_form_test_with_special_characters_field()
|
49
|
+
# Parameters for the API call
|
50
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":"farhan","field":"&&&"}'))
|
51
|
+
|
52
|
+
# Perform the API call through the SDK function
|
53
|
+
result = self.class.controller.send_delete_form(body)
|
54
|
+
|
55
|
+
# Test response code
|
56
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
57
|
+
|
58
|
+
# Test whether the captured response is as we expected
|
59
|
+
assert_not_nil(result)
|
60
|
+
expected_body = JSON.parse('{"passed":true}')
|
61
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
62
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
63
|
+
end
|
64
|
+
|
65
|
+
# Todo: Add description for test test_delete_form_test_with_blank_field
|
66
|
+
def test_delete_form_test_with_blank_field()
|
67
|
+
# Parameters for the API call
|
68
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":"farhan","field":" "}'))
|
69
|
+
|
70
|
+
# Perform the API call through the SDK function
|
71
|
+
result = self.class.controller.send_delete_form(body)
|
72
|
+
|
73
|
+
# Test response code
|
74
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
75
|
+
|
76
|
+
# Test whether the captured response is as we expected
|
77
|
+
assert_not_nil(result)
|
78
|
+
expected_body = JSON.parse('{"passed":true}')
|
79
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
80
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
81
|
+
end
|
82
|
+
|
83
|
+
# Todo: Add description for test test_delete_form_test_with_blank_name_field
|
84
|
+
def test_delete_form_test_with_blank_name_field()
|
85
|
+
# Parameters for the API call
|
86
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":" ","field":" "}'))
|
87
|
+
|
88
|
+
# Perform the API call through the SDK function
|
89
|
+
result = self.class.controller.send_delete_form(body)
|
90
|
+
|
91
|
+
# Test response code
|
92
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
93
|
+
|
94
|
+
# Test whether the captured response is as we expected
|
95
|
+
assert_not_nil(result)
|
96
|
+
expected_body = JSON.parse('{"passed":true}')
|
97
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
98
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
99
|
+
end
|
100
|
+
|
101
|
+
# Todo: Add description for test test_delete_form_test_with_blank_name
|
102
|
+
def test_delete_form_test_with_blank_name()
|
103
|
+
# Parameters for the API call
|
104
|
+
body = DeleteBody.from_hash(JSON.parse('{"name":" ","field":"QA"}'))
|
105
|
+
|
106
|
+
# Perform the API call through the SDK function
|
107
|
+
result = self.class.controller.send_delete_form(body)
|
108
|
+
|
109
|
+
# Test response code
|
110
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
111
|
+
|
112
|
+
# Test whether the captured response is as we expected
|
113
|
+
assert_not_nil(result)
|
114
|
+
expected_body = JSON.parse('{"passed":true}')
|
115
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
116
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
117
|
+
end
|
118
|
+
|
119
|
+
# Todo: Add description for test test_send_date_array
|
120
|
+
def test_send_date_array()
|
121
|
+
# Parameters for the API call
|
122
|
+
dates = JSON.parse('["1994-02-13","1994-02-13"]').map { |element| Date.iso8601(element) }
|
123
|
+
|
124
|
+
# Perform the API call through the SDK function
|
125
|
+
result = self.class.controller.send_date_array(dates)
|
126
|
+
|
127
|
+
# Test response code
|
128
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
129
|
+
|
130
|
+
# Test whether the captured response is as we expected
|
131
|
+
assert_not_nil(result)
|
132
|
+
expected_body = JSON.parse('{"passed":true}')
|
133
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
134
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
135
|
+
end
|
136
|
+
|
137
|
+
# Todo: Add description for test test_send_date
|
138
|
+
def test_send_date()
|
139
|
+
# Parameters for the API call
|
140
|
+
date = Date.parse('1994-02-13')
|
141
|
+
|
142
|
+
# Perform the API call through the SDK function
|
143
|
+
result = self.class.controller.send_date(date)
|
144
|
+
|
145
|
+
# Test response code
|
146
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
147
|
+
|
148
|
+
# Test whether the captured response is as we expected
|
149
|
+
assert_not_nil(result)
|
150
|
+
expected_body = JSON.parse('{"passed":true}')
|
151
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
152
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
153
|
+
end
|
154
|
+
|
155
|
+
# Todo: Add description for test test_send_unix_date_time
|
156
|
+
def test_send_unix_date_time()
|
157
|
+
# Parameters for the API call
|
158
|
+
datetime = Time.at(1484719381).utc.to_datetime
|
159
|
+
|
160
|
+
# Perform the API call through the SDK function
|
161
|
+
result = self.class.controller.send_unix_date_time(datetime)
|
162
|
+
|
163
|
+
# Test response code
|
164
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
165
|
+
|
166
|
+
# Test whether the captured response is as we expected
|
167
|
+
assert_not_nil(result)
|
168
|
+
expected_body = JSON.parse('{"passed":true}')
|
169
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
170
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
171
|
+
end
|
172
|
+
|
173
|
+
# Todo: Add description for test test_send_rfc_1123_date_time
|
174
|
+
def test_send_rfc_1123_date_time()
|
175
|
+
# Parameters for the API call
|
176
|
+
datetime = DateTime.httpdate('Sun, 06 Nov 1994 08:49:37 GMT')
|
177
|
+
|
178
|
+
# Perform the API call through the SDK function
|
179
|
+
result = self.class.controller.send_rfc_1123_date_time(datetime)
|
180
|
+
|
181
|
+
# Test response code
|
182
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
183
|
+
|
184
|
+
# Test whether the captured response is as we expected
|
185
|
+
assert_not_nil(result)
|
186
|
+
expected_body = JSON.parse('{"passed":true}')
|
187
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
188
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
189
|
+
end
|
190
|
+
|
191
|
+
# Todo: Add description for test test_send_rfc_3339_date_time
|
192
|
+
def test_send_rfc_3339_date_time()
|
193
|
+
# Parameters for the API call
|
194
|
+
datetime = DateTime.rfc3339('1994-02-13T14:01:54.9571247Z')
|
195
|
+
|
196
|
+
# Perform the API call through the SDK function
|
197
|
+
result = self.class.controller.send_rfc_3339_date_time(datetime)
|
198
|
+
|
199
|
+
# Test response code
|
200
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
201
|
+
|
202
|
+
# Test whether the captured response is as we expected
|
203
|
+
assert_not_nil(result)
|
204
|
+
expected_body = JSON.parse('{"passed":true}')
|
205
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
206
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
207
|
+
end
|
208
|
+
|
209
|
+
# Todo: Add description for test test_send_unix_date_time_array
|
210
|
+
def test_send_unix_date_time_array()
|
211
|
+
# Parameters for the API call
|
212
|
+
datetimes = JSON.parse('[1484719381,1484719381]').map { |element| Time.at(element).utc.to_datetime }
|
213
|
+
|
214
|
+
# Perform the API call through the SDK function
|
215
|
+
result = self.class.controller.send_unix_date_time_array(datetimes)
|
216
|
+
|
217
|
+
# Test response code
|
218
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
219
|
+
|
220
|
+
# Test whether the captured response is as we expected
|
221
|
+
assert_not_nil(result)
|
222
|
+
expected_body = JSON.parse('{"passed":true}')
|
223
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
224
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
225
|
+
end
|
226
|
+
|
227
|
+
# Todo: Add description for test test_send_rfc_1123_date_time_array
|
228
|
+
def test_send_rfc_1123_date_time_array()
|
229
|
+
# Parameters for the API call
|
230
|
+
datetimes = JSON.parse('["Sun, 06 Nov 1994 08:49:37 GMT","Sun, 06 Nov 1994 08:49:37 GMT"]').map { |element| DateTime.httpdate(element) }
|
231
|
+
|
232
|
+
# Perform the API call through the SDK function
|
233
|
+
result = self.class.controller.send_rfc_1123_date_time_array(datetimes)
|
234
|
+
|
235
|
+
# Test response code
|
236
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
237
|
+
|
238
|
+
# Test whether the captured response is as we expected
|
239
|
+
assert_not_nil(result)
|
240
|
+
expected_body = JSON.parse('{"passed":true}')
|
241
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
242
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
243
|
+
end
|
244
|
+
|
245
|
+
# Todo: Add description for test test_send_long
|
246
|
+
def test_send_long()
|
247
|
+
# Parameters for the API call
|
248
|
+
value = 5147483647
|
249
|
+
|
250
|
+
# Perform the API call through the SDK function
|
251
|
+
result = self.class.controller.send_long(value)
|
252
|
+
|
253
|
+
# Test response code
|
254
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
255
|
+
|
256
|
+
# Test whether the captured response is as we expected
|
257
|
+
assert_not_nil(result)
|
258
|
+
expected_body = JSON.parse('{"passed":true}')
|
259
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
260
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
261
|
+
end
|
262
|
+
|
263
|
+
# Todo: Add description for test test_send_integer_array
|
264
|
+
def test_send_integer_array()
|
265
|
+
# Parameters for the API call
|
266
|
+
integers = JSON.parse('[1,2,3,4,5]')
|
267
|
+
|
268
|
+
# Perform the API call through the SDK function
|
269
|
+
result = self.class.controller.send_integer_array(integers)
|
270
|
+
|
271
|
+
# Test response code
|
272
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
273
|
+
|
274
|
+
# Test whether the captured response is as we expected
|
275
|
+
assert_not_nil(result)
|
276
|
+
expected_body = JSON.parse('{"passed":true}')
|
277
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
278
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
279
|
+
end
|
280
|
+
|
281
|
+
# Todo: Add description for test test_send_string_array
|
282
|
+
def test_send_string_array()
|
283
|
+
# Parameters for the API call
|
284
|
+
strings = JSON.parse('["abc","def"]')
|
285
|
+
|
286
|
+
# Perform the API call through the SDK function
|
287
|
+
result = self.class.controller.send_string_array(strings)
|
288
|
+
|
289
|
+
# Test response code
|
290
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
291
|
+
|
292
|
+
# Test whether the captured response is as we expected
|
293
|
+
assert_not_nil(result)
|
294
|
+
expected_body = JSON.parse('{"passed":true}')
|
295
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
296
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
297
|
+
end
|
298
|
+
|
299
|
+
# Todo: Add description for test test_allow_dynamic_form_fields
|
300
|
+
def test_allow_dynamic_form_fields()
|
301
|
+
# Parameters for the API call
|
302
|
+
name = 'farhan'
|
303
|
+
|
304
|
+
# dictionary for optional form parameters
|
305
|
+
optional_form_parameters = {}
|
306
|
+
optional_form_parameters['field'] = 'QA'
|
307
|
+
|
308
|
+
# Perform the API call through the SDK function
|
309
|
+
result = self.class.controller.allow_dynamic_form_fields(name, optional_form_parameters)
|
310
|
+
|
311
|
+
# Test response code
|
312
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
313
|
+
|
314
|
+
# Test whether the captured response is as we expected
|
315
|
+
assert_not_nil(result)
|
316
|
+
expected_body = JSON.parse('{"passed":true}')
|
317
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
318
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
319
|
+
end
|
320
|
+
|
321
|
+
# Todo: Add description for test test_send_model
|
322
|
+
def test_send_model()
|
323
|
+
# Parameters for the API call
|
324
|
+
model = Employee.from_hash(JSON.parse(
|
325
|
+
'{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid":'\
|
326
|
+
'"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"'\
|
327
|
+
',"salary":20000,"department":"Software Development","joiningDay":"Saturday"'\
|
328
|
+
',"workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","n'\
|
329
|
+
'ame":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"123'\
|
330
|
+
'321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","sa'\
|
331
|
+
'lary":20000,"department":"Software Development","joiningDay":"Saturday","wo'\
|
332
|
+
'rkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wife'\
|
333
|
+
'","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"1'\
|
334
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid"'\
|
335
|
+
',"age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"19'\
|
336
|
+
'94-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 N'\
|
337
|
+
'ov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futur'\
|
338
|
+
'e Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthd'\
|
339
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futur'\
|
340
|
+
'e Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthda'\
|
341
|
+
'y":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun'\
|
342
|
+
', 06 Nov 1994 08:49:37 GMT"}'
|
343
|
+
))
|
344
|
+
|
345
|
+
# Perform the API call through the SDK function
|
346
|
+
result = self.class.controller.send_model(model)
|
347
|
+
|
348
|
+
# Test response code
|
349
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
350
|
+
|
351
|
+
# Test whether the captured response is as we expected
|
352
|
+
assert_not_nil(result)
|
353
|
+
expected_body = JSON.parse('{"passed":true}')
|
354
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
355
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
356
|
+
end
|
357
|
+
|
358
|
+
# Todo: Add description for test test_send_model_array
|
359
|
+
def test_send_model_array()
|
360
|
+
# Parameters for the API call
|
361
|
+
models = JSON.parse(
|
362
|
+
'[{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid"'\
|
363
|
+
':"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z'\
|
364
|
+
'","salary":20000,"department":"Software Development","joiningDay":"Saturday'\
|
365
|
+
'","workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","'\
|
366
|
+
'name":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"12'\
|
367
|
+
'3321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","s'\
|
368
|
+
'alary":20000,"department":"Software Development","joiningDay":"Saturday","w'\
|
369
|
+
'orkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wif'\
|
370
|
+
'e","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"'\
|
371
|
+
'1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid'\
|
372
|
+
'","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"1'\
|
373
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 '\
|
374
|
+
'Nov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futu'\
|
375
|
+
're Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birth'\
|
376
|
+
'day":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futu'\
|
377
|
+
're Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthd'\
|
378
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Su'\
|
379
|
+
'n, 06 Nov 1994 08:49:37 GMT"},{"name":"Shahid Khaliq","age":5147483645,"add'\
|
380
|
+
'ress":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":'\
|
381
|
+
'"1994-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Develo'\
|
382
|
+
'pment","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],'\
|
383
|
+
'"boss":{"personType":"Boss","name":"Zeeshan Ejaz","age":5147483645,"address'\
|
384
|
+
'":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":"199'\
|
385
|
+
'4-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Developmen'\
|
386
|
+
't","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],"dep'\
|
387
|
+
'endents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, S # 20'\
|
388
|
+
'","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9'\
|
389
|
+
'571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S # 20"'\
|
390
|
+
',"uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.95'\
|
391
|
+
'71247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT","promotedAt":1484719381'\
|
392
|
+
'},"dependents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, '\
|
393
|
+
'S # 20","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:0'\
|
394
|
+
'1:54.9571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S'\
|
395
|
+
' # 20","uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01'\
|
396
|
+
':54.9571247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT"}]'
|
397
|
+
).map { |element| Employee.from_hash(element) }
|
398
|
+
|
399
|
+
# Perform the API call through the SDK function
|
400
|
+
result = self.class.controller.send_model_array(models)
|
401
|
+
|
402
|
+
# Test response code
|
403
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
404
|
+
|
405
|
+
# Test whether the captured response is as we expected
|
406
|
+
assert_not_nil(result)
|
407
|
+
expected_body = JSON.parse('{"passed":true}')
|
408
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
409
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
410
|
+
end
|
411
|
+
|
412
|
+
# Todo: Add description for test test_send_file
|
413
|
+
def test_send_file()
|
414
|
+
# Parameters for the API call
|
415
|
+
file = Faraday::UploadIO.new(TestHelper.get_file('http://localhost:3000/response/image'), 'application/octet-stream')
|
416
|
+
|
417
|
+
# Perform the API call through the SDK function
|
418
|
+
result = self.class.controller.send_file(file)
|
419
|
+
|
420
|
+
# Test response code
|
421
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
422
|
+
|
423
|
+
# Test whether the captured response is as we expected
|
424
|
+
assert_not_nil(result)
|
425
|
+
expected_body = JSON.parse('{"passed":true}')
|
426
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
427
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
428
|
+
end
|
429
|
+
|
430
|
+
# Todo: Add description for test test_send_multiple_files
|
431
|
+
def test_send_multiple_files()
|
432
|
+
# Parameters for the API call
|
433
|
+
file = Faraday::UploadIO.new(TestHelper.get_file('http://localhost:3000/response/image'), 'application/octet-stream')
|
434
|
+
file1 = Faraday::UploadIO.new(TestHelper.get_file('http://localhost:3000/response/image'), 'application/octet-stream')
|
435
|
+
|
436
|
+
# Perform the API call through the SDK function
|
437
|
+
result = self.class.controller.send_multiple_files(file, file1)
|
438
|
+
|
439
|
+
# Test response code
|
440
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
441
|
+
end
|
442
|
+
|
443
|
+
# Todo: Add description for test test_send_string
|
444
|
+
def test_send_string()
|
445
|
+
# Parameters for the API call
|
446
|
+
value = 'TestString'
|
447
|
+
|
448
|
+
# Perform the API call through the SDK function
|
449
|
+
result = self.class.controller.send_string(value)
|
450
|
+
|
451
|
+
# Test response code
|
452
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
453
|
+
|
454
|
+
# Test whether the captured response is as we expected
|
455
|
+
assert_not_nil(result)
|
456
|
+
expected_body = JSON.parse('{"passed":true}')
|
457
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
458
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
459
|
+
end
|
460
|
+
|
461
|
+
# Todo: Add description for test test_send_multiliner_string
|
462
|
+
def test_send_multiliner_string()
|
463
|
+
# Parameters for the API call
|
464
|
+
value = 'TestString
|
465
|
+
nouman'
|
466
|
+
|
467
|
+
# Perform the API call through the SDK function
|
468
|
+
result = self.class.controller.send_string(value)
|
469
|
+
|
470
|
+
# Test response code
|
471
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
472
|
+
|
473
|
+
# Test whether the captured response is as we expected
|
474
|
+
assert_not_nil(result)
|
475
|
+
expected_body = JSON.parse('{"passed":true}')
|
476
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
477
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
478
|
+
end
|
479
|
+
|
480
|
+
# Todo: Add description for test test_send_string_with_special_characters
|
481
|
+
def test_send_string_with_special_characters()
|
482
|
+
# Parameters for the API call
|
483
|
+
value = '$%^!@#$%^&*'
|
484
|
+
|
485
|
+
# Perform the API call through the SDK function
|
486
|
+
result = self.class.controller.send_string(value)
|
487
|
+
|
488
|
+
# Test response code
|
489
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
490
|
+
|
491
|
+
# Test whether the captured response is as we expected
|
492
|
+
assert_not_nil(result)
|
493
|
+
expected_body = JSON.parse('{"passed":true}')
|
494
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
495
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
496
|
+
end
|
497
|
+
|
498
|
+
# Todo: Add description for test test_send_string_with_only_space
|
499
|
+
def test_send_string_with_only_space()
|
500
|
+
# Parameters for the API call
|
501
|
+
value = ' '
|
502
|
+
|
503
|
+
# Perform the API call through the SDK function
|
504
|
+
result = self.class.controller.send_string(value)
|
505
|
+
|
506
|
+
# Test response code
|
507
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
508
|
+
|
509
|
+
# Test whether the captured response is as we expected
|
510
|
+
assert_not_nil(result)
|
511
|
+
expected_body = JSON.parse('{"passed":true}')
|
512
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
513
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
514
|
+
end
|
515
|
+
|
516
|
+
# Todo: Add description for test test_send_empty_string
|
517
|
+
def test_send_empty_string()
|
518
|
+
# Parameters for the API call
|
519
|
+
value = ''
|
520
|
+
|
521
|
+
# Perform the API call through the SDK function
|
522
|
+
result = self.class.controller.send_string(value)
|
523
|
+
|
524
|
+
# Test response code
|
525
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
526
|
+
|
527
|
+
# Test whether the captured response is as we expected
|
528
|
+
assert_not_nil(result)
|
529
|
+
expected_body = JSON.parse('{"passed":true}')
|
530
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
531
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
532
|
+
end
|
533
|
+
|
534
|
+
# Todo: Add description for test test_send_rfc_3339_date_time_array
|
535
|
+
def test_send_rfc_3339_date_time_array()
|
536
|
+
# Parameters for the API call
|
537
|
+
datetimes = JSON.parse('["1994-02-13T14:01:54.9571247Z","1994-02-13T14:01:54.9571247Z"]').map { |element| DateTime.rfc3339(element) }
|
538
|
+
|
539
|
+
# Perform the API call through the SDK function
|
540
|
+
result = self.class.controller.send_rfc_3339_date_time_array(datetimes)
|
541
|
+
|
542
|
+
# Test response code
|
543
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
544
|
+
|
545
|
+
# Test whether the captured response is as we expected
|
546
|
+
assert_not_nil(result)
|
547
|
+
expected_body = JSON.parse('{"passed":true}')
|
548
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
549
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
550
|
+
end
|
551
|
+
|
552
|
+
# Todo: Add description for test test_send_mixed_array
|
553
|
+
def test_send_mixed_array()
|
554
|
+
# Parameters for the API call
|
555
|
+
options = {}
|
556
|
+
options['file'] = Faraday::UploadIO.new(TestHelper.get_file('http://localhost:3000/response/image'), 'application/octet-stream')
|
557
|
+
options['integers'] = JSON.parse('[1,2,3,4,5]')
|
558
|
+
options['models'] = JSON.parse(
|
559
|
+
'[{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid"'\
|
560
|
+
':"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z'\
|
561
|
+
'","salary":20000,"department":"Software Development","joiningDay":"Saturday'\
|
562
|
+
'","workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","'\
|
563
|
+
'name":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"12'\
|
564
|
+
'3321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","s'\
|
565
|
+
'alary":20000,"department":"Software Development","joiningDay":"Saturday","w'\
|
566
|
+
'orkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wif'\
|
567
|
+
'e","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"'\
|
568
|
+
'1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid'\
|
569
|
+
'","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"1'\
|
570
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 '\
|
571
|
+
'Nov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futu'\
|
572
|
+
're Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birth'\
|
573
|
+
'day":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futu'\
|
574
|
+
're Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthd'\
|
575
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Su'\
|
576
|
+
'n, 06 Nov 1994 08:49:37 GMT"},{"name":"Shahid Khaliq","age":5147483645,"add'\
|
577
|
+
'ress":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":'\
|
578
|
+
'"1994-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Develo'\
|
579
|
+
'pment","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],'\
|
580
|
+
'"boss":{"personType":"Boss","name":"Zeeshan Ejaz","age":5147483645,"address'\
|
581
|
+
'":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":"199'\
|
582
|
+
'4-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Developmen'\
|
583
|
+
't","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],"dep'\
|
584
|
+
'endents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, S # 20'\
|
585
|
+
'","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9'\
|
586
|
+
'571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S # 20"'\
|
587
|
+
',"uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.95'\
|
588
|
+
'71247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT","promotedAt":1484719381'\
|
589
|
+
'},"dependents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, '\
|
590
|
+
'S # 20","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:0'\
|
591
|
+
'1:54.9571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S'\
|
592
|
+
' # 20","uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01'\
|
593
|
+
':54.9571247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT"}]'
|
594
|
+
).map { |element| Employee.from_hash(element) }
|
595
|
+
options['strings'] = JSON.parse('["abc","def"]')
|
596
|
+
|
597
|
+
# Perform the API call through the SDK function
|
598
|
+
result = self.class.controller.send_mixed_array(options)
|
599
|
+
|
600
|
+
# Test response code
|
601
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
602
|
+
|
603
|
+
# Test whether the captured response is as we expected
|
604
|
+
assert_not_nil(result)
|
605
|
+
expected_body = JSON.parse('{"passed":true}')
|
606
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
607
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
608
|
+
end
|
609
|
+
|
610
|
+
# Todo: Add description for test test_update_model_with_form
|
611
|
+
def test_update_model_with_form()
|
612
|
+
# Parameters for the API call
|
613
|
+
model = Employee.from_hash(JSON.parse(
|
614
|
+
'{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid":'\
|
615
|
+
'"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"'\
|
616
|
+
',"salary":20000,"department":"Software Development","joiningDay":"Saturday"'\
|
617
|
+
',"workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","n'\
|
618
|
+
'ame":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"123'\
|
619
|
+
'321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","sa'\
|
620
|
+
'lary":20000,"department":"Software Development","joiningDay":"Saturday","wo'\
|
621
|
+
'rkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wife'\
|
622
|
+
'","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"1'\
|
623
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid"'\
|
624
|
+
',"age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"19'\
|
625
|
+
'94-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 N'\
|
626
|
+
'ov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futur'\
|
627
|
+
'e Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthd'\
|
628
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futur'\
|
629
|
+
'e Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthda'\
|
630
|
+
'y":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun'\
|
631
|
+
', 06 Nov 1994 08:49:37 GMT"}'
|
632
|
+
))
|
633
|
+
|
634
|
+
# Perform the API call through the SDK function
|
635
|
+
result = self.class.controller.update_model_with_form(model)
|
636
|
+
|
637
|
+
# Test response code
|
638
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
639
|
+
|
640
|
+
# Test whether the captured response is as we expected
|
641
|
+
assert_not_nil(result)
|
642
|
+
expected_body = JSON.parse('{"passed":true}')
|
643
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
644
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
645
|
+
end
|
646
|
+
|
647
|
+
# Todo: Add description for test test_delete_form_test_with_model
|
648
|
+
def test_delete_form_test_with_model()
|
649
|
+
# Parameters for the API call
|
650
|
+
model = Employee.from_hash(JSON.parse(
|
651
|
+
'{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid":'\
|
652
|
+
'"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"'\
|
653
|
+
',"salary":20000,"department":"Software Development","joiningDay":"Saturday"'\
|
654
|
+
',"workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","n'\
|
655
|
+
'ame":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"123'\
|
656
|
+
'321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","sa'\
|
657
|
+
'lary":20000,"department":"Software Development","joiningDay":"Saturday","wo'\
|
658
|
+
'rkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wife'\
|
659
|
+
'","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"1'\
|
660
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid"'\
|
661
|
+
',"age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"19'\
|
662
|
+
'94-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 N'\
|
663
|
+
'ov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futur'\
|
664
|
+
'e Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthd'\
|
665
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futur'\
|
666
|
+
'e Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthda'\
|
667
|
+
'y":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun'\
|
668
|
+
', 06 Nov 1994 08:49:37 GMT"}'
|
669
|
+
))
|
670
|
+
|
671
|
+
# Perform the API call through the SDK function
|
672
|
+
result = self.class.controller.send_delete_form_1(model)
|
673
|
+
|
674
|
+
# Test response code
|
675
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
676
|
+
|
677
|
+
# Test whether the captured response is as we expected
|
678
|
+
assert_not_nil(result)
|
679
|
+
expected_body = JSON.parse('{"passed":true}')
|
680
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
681
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
682
|
+
end
|
683
|
+
|
684
|
+
# Todo: Add description for test test_send_delete_form_with_model_array
|
685
|
+
def test_send_delete_form_with_model_array()
|
686
|
+
# Parameters for the API call
|
687
|
+
models = JSON.parse(
|
688
|
+
'[{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid"'\
|
689
|
+
':"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z'\
|
690
|
+
'","salary":20000,"department":"Software Development","joiningDay":"Saturday'\
|
691
|
+
'","workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","'\
|
692
|
+
'name":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"12'\
|
693
|
+
'3321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","s'\
|
694
|
+
'alary":20000,"department":"Software Development","joiningDay":"Saturday","w'\
|
695
|
+
'orkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wif'\
|
696
|
+
'e","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"'\
|
697
|
+
'1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid'\
|
698
|
+
'","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"1'\
|
699
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 '\
|
700
|
+
'Nov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futu'\
|
701
|
+
're Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birth'\
|
702
|
+
'day":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futu'\
|
703
|
+
're Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthd'\
|
704
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Su'\
|
705
|
+
'n, 06 Nov 1994 08:49:37 GMT"},{"name":"Shahid Khaliq","age":5147483645,"add'\
|
706
|
+
'ress":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":'\
|
707
|
+
'"1994-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Develo'\
|
708
|
+
'pment","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],'\
|
709
|
+
'"boss":{"personType":"Boss","name":"Zeeshan Ejaz","age":5147483645,"address'\
|
710
|
+
'":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":"199'\
|
711
|
+
'4-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Developmen'\
|
712
|
+
't","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],"dep'\
|
713
|
+
'endents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, S # 20'\
|
714
|
+
'","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9'\
|
715
|
+
'571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S # 20"'\
|
716
|
+
',"uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.95'\
|
717
|
+
'71247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT","promotedAt":1484719381'\
|
718
|
+
'},"dependents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, '\
|
719
|
+
'S # 20","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:0'\
|
720
|
+
'1:54.9571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S'\
|
721
|
+
' # 20","uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01'\
|
722
|
+
':54.9571247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT"}]'
|
723
|
+
).map { |element| Employee.from_hash(element) }
|
724
|
+
|
725
|
+
# Perform the API call through the SDK function
|
726
|
+
result = self.class.controller.send_delete_form_with_model_array(models)
|
727
|
+
|
728
|
+
# Test response code
|
729
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
730
|
+
|
731
|
+
# Test whether the captured response is as we expected
|
732
|
+
assert_not_nil(result)
|
733
|
+
expected_body = JSON.parse('{"passed":true}')
|
734
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
735
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
736
|
+
end
|
737
|
+
|
738
|
+
# Todo: Add description for test test_update_model_array_with_form
|
739
|
+
def test_update_model_array_with_form()
|
740
|
+
# Parameters for the API call
|
741
|
+
models = JSON.parse(
|
742
|
+
'[{"name":"Shahid Khaliq","age":5147483645,"address":"H # 531, S # 20","uid"'\
|
743
|
+
':"123321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z'\
|
744
|
+
'","salary":20000,"department":"Software Development","joiningDay":"Saturday'\
|
745
|
+
'","workingDays":["Monday","Tuesday","Friday"],"boss":{"personType":"Boss","'\
|
746
|
+
'name":"Zeeshan Ejaz","age":5147483645,"address":"H # 531, S # 20","uid":"12'\
|
747
|
+
'3321","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z","s'\
|
748
|
+
'alary":20000,"department":"Software Development","joiningDay":"Saturday","w'\
|
749
|
+
'orkingDays":["Monday","Tuesday","Friday"],"dependents":[{"name":"Future Wif'\
|
750
|
+
'e","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birthday":"'\
|
751
|
+
'1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Future Kid'\
|
752
|
+
'","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthday":"1'\
|
753
|
+
'994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Sun, 06 '\
|
754
|
+
'Nov 1994 08:49:37 GMT","promotedAt":1484719381},"dependents":[{"name":"Futu'\
|
755
|
+
're Wife","age":5147483649,"address":"H # 531, S # 20","uid":"123412","birth'\
|
756
|
+
'day":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"},{"name":"Futu'\
|
757
|
+
're Kid","age":5147483648,"address":"H # 531, S # 20","uid":"312341","birthd'\
|
758
|
+
'ay":"1994-02-13","birthtime":"1994-02-13T14:01:54.9571247Z"}],"hiredAt":"Su'\
|
759
|
+
'n, 06 Nov 1994 08:49:37 GMT"},{"name":"Shahid Khaliq","age":5147483645,"add'\
|
760
|
+
'ress":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":'\
|
761
|
+
'"1994-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Develo'\
|
762
|
+
'pment","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],'\
|
763
|
+
'"boss":{"personType":"Boss","name":"Zeeshan Ejaz","age":5147483645,"address'\
|
764
|
+
'":"H # 531, S # 20","uid":"123321","birthday":"1994-02-13","birthtime":"199'\
|
765
|
+
'4-02-13T14:01:54.9571247Z","salary":20000,"department":"Software Developmen'\
|
766
|
+
't","joiningDay":"Saturday","workingDays":["Monday","Tuesday","Friday"],"dep'\
|
767
|
+
'endents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, S # 20'\
|
768
|
+
'","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.9'\
|
769
|
+
'571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S # 20"'\
|
770
|
+
',"uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01:54.95'\
|
771
|
+
'71247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT","promotedAt":1484719381'\
|
772
|
+
'},"dependents":[{"name":"Future Wife","age":5147483649,"address":"H # 531, '\
|
773
|
+
'S # 20","uid":"123412","birthday":"1994-02-13","birthtime":"1994-02-13T14:0'\
|
774
|
+
'1:54.9571247Z"},{"name":"Future Kid","age":5147483648,"address":"H # 531, S'\
|
775
|
+
' # 20","uid":"312341","birthday":"1994-02-13","birthtime":"1994-02-13T14:01'\
|
776
|
+
':54.9571247Z"}],"hiredAt":"Sun, 06 Nov 1994 08:49:37 GMT"}]'
|
777
|
+
).map { |element| Employee.from_hash(element) }
|
778
|
+
|
779
|
+
# Perform the API call through the SDK function
|
780
|
+
result = self.class.controller.update_model_array_with_form(models)
|
781
|
+
|
782
|
+
# Test response code
|
783
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
784
|
+
|
785
|
+
# Test whether the captured response is as we expected
|
786
|
+
assert_not_nil(result)
|
787
|
+
expected_body = JSON.parse('{"passed":true}')
|
788
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
789
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
790
|
+
end
|
791
|
+
|
792
|
+
# Todo: Add description for test test_update_string_with_form
|
793
|
+
def test_update_string_with_form()
|
794
|
+
# Parameters for the API call
|
795
|
+
value = 'TestString'
|
796
|
+
|
797
|
+
# Perform the API call through the SDK function
|
798
|
+
result = self.class.controller.update_string_with_form(value)
|
799
|
+
|
800
|
+
# Test response code
|
801
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
802
|
+
|
803
|
+
# Test whether the captured response is as we expected
|
804
|
+
assert_not_nil(result)
|
805
|
+
expected_body = JSON.parse('{"passed":true}')
|
806
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
807
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
808
|
+
end
|
809
|
+
|
810
|
+
# Todo: Add description for test test_update_special_string_with_form
|
811
|
+
def test_update_special_string_with_form()
|
812
|
+
# Parameters for the API call
|
813
|
+
value = '$%^!@#$%^&*'
|
814
|
+
|
815
|
+
# Perform the API call through the SDK function
|
816
|
+
result = self.class.controller.update_string_with_form(value)
|
817
|
+
|
818
|
+
# Test response code
|
819
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
820
|
+
|
821
|
+
# Test whether the captured response is as we expected
|
822
|
+
assert_not_nil(result)
|
823
|
+
expected_body = JSON.parse('{"passed":true}')
|
824
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
825
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
826
|
+
end
|
827
|
+
|
828
|
+
# Todo: Add description for test test_update_multiliner_string_with_form
|
829
|
+
def test_update_multiliner_string_with_form()
|
830
|
+
# Parameters for the API call
|
831
|
+
value = 'TestString
|
832
|
+
nouman'
|
833
|
+
|
834
|
+
# Perform the API call through the SDK function
|
835
|
+
result = self.class.controller.update_string_with_form(value)
|
836
|
+
|
837
|
+
# Test response code
|
838
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
839
|
+
|
840
|
+
# Test whether the captured response is as we expected
|
841
|
+
assert_not_nil(result)
|
842
|
+
expected_body = JSON.parse('{"passed":true}')
|
843
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
844
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
845
|
+
end
|
846
|
+
|
847
|
+
# Todo: Add description for test test_update_string_with_form_corner_case
|
848
|
+
def test_update_string_with_form_corner_case()
|
849
|
+
# Parameters for the API call
|
850
|
+
value = ' '
|
851
|
+
|
852
|
+
# Perform the API call through the SDK function
|
853
|
+
result = self.class.controller.update_string_with_form(value)
|
854
|
+
|
855
|
+
# Test response code
|
856
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
857
|
+
|
858
|
+
# Test whether the captured response is as we expected
|
859
|
+
assert_not_nil(result)
|
860
|
+
expected_body = JSON.parse('{"passed":true}')
|
861
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
862
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
863
|
+
end
|
864
|
+
|
865
|
+
# Todo: Add description for test test_update_empty_string_with_form
|
866
|
+
def test_update_empty_string_with_form()
|
867
|
+
# Parameters for the API call
|
868
|
+
value = ''
|
869
|
+
|
870
|
+
# Perform the API call through the SDK function
|
871
|
+
result = self.class.controller.update_string_with_form(value)
|
872
|
+
|
873
|
+
# Test response code
|
874
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
875
|
+
|
876
|
+
# Test whether the captured response is as we expected
|
877
|
+
assert_not_nil(result)
|
878
|
+
expected_body = JSON.parse('{"passed":true}')
|
879
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
880
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
881
|
+
end
|
882
|
+
|
883
|
+
# Todo: Add description for test test_update_string_array_with_form
|
884
|
+
def test_update_string_array_with_form()
|
885
|
+
# Parameters for the API call
|
886
|
+
strings = JSON.parse('["abc","def"]')
|
887
|
+
|
888
|
+
# Perform the API call through the SDK function
|
889
|
+
result = self.class.controller.update_string_array_with_form(strings)
|
890
|
+
|
891
|
+
# Test response code
|
892
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
893
|
+
|
894
|
+
# Test whether the captured response is as we expected
|
895
|
+
assert_not_nil(result)
|
896
|
+
expected_body = JSON.parse('{"passed":true}')
|
897
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
898
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
899
|
+
end
|
900
|
+
|
901
|
+
# Todo: Add description for test test_send_integer_enum_array
|
902
|
+
def test_send_integer_enum_array()
|
903
|
+
# Parameters for the API call
|
904
|
+
suites = JSON.parse('[1,3,4,2,3]')
|
905
|
+
|
906
|
+
# Perform the API call through the SDK function
|
907
|
+
result = self.class.controller.send_integer_enum_array(suites)
|
908
|
+
|
909
|
+
# Test response code
|
910
|
+
assert([*200..208].include? @response_catcher.response.status_code)
|
911
|
+
|
912
|
+
# Test whether the captured response is as we expected
|
913
|
+
assert_not_nil(result)
|
914
|
+
expected_body = JSON.parse('{"passed":true}')
|
915
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
916
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
917
|
+
end
|
918
|
+
|
919
|
+
# Todo: Add description for test test_send_string_enum_array
|
920
|
+
def test_send_string_enum_array()
|
921
|
+
# Parameters for the API call
|
922
|
+
days = JSON.parse('["Tuesday","Saturday","Wednesday","Monday","Sunday"]')
|
923
|
+
|
924
|
+
# Perform the API call through the SDK function
|
925
|
+
result = self.class.controller.send_string_enum_array(days)
|
926
|
+
|
927
|
+
# Test response code
|
928
|
+
assert([*200..208].include? @response_catcher.response.status_code)
|
929
|
+
|
930
|
+
# Test whether the captured response is as we expected
|
931
|
+
assert_not_nil(result)
|
932
|
+
expected_body = JSON.parse('{"passed":true}')
|
933
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
934
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
935
|
+
end
|
936
|
+
|
937
|
+
# Todo: Add description for test test_send_string_in_form_with_new_line_1
|
938
|
+
def test_send_string_in_form_with_new_line_1()
|
939
|
+
# Parameters for the API call
|
940
|
+
body = TestNstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA"}'))
|
941
|
+
|
942
|
+
# Perform the API call through the SDK function
|
943
|
+
result = self.class.controller.send_string_in_form_with_new_line(body)
|
944
|
+
|
945
|
+
# Test response code
|
946
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
947
|
+
|
948
|
+
# Test whether the captured response is as we expected
|
949
|
+
assert_not_nil(result)
|
950
|
+
expected_body = JSON.parse('{"passed":true}')
|
951
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
952
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
953
|
+
end
|
954
|
+
|
955
|
+
# Todo: Add description for test test_send_string_in_form_with_new_line_2
|
956
|
+
def test_send_string_in_form_with_new_line_2()
|
957
|
+
# Parameters for the API call
|
958
|
+
body = TestNstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA&Dev"}'))
|
959
|
+
|
960
|
+
# Perform the API call through the SDK function
|
961
|
+
result = self.class.controller.send_string_in_form_with_new_line(body)
|
962
|
+
|
963
|
+
# Test response code
|
964
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
965
|
+
|
966
|
+
# Test whether the captured response is as we expected
|
967
|
+
assert_not_nil(result)
|
968
|
+
expected_body = JSON.parse('{"passed":true}')
|
969
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
970
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
971
|
+
end
|
972
|
+
|
973
|
+
# Todo: Add description for test test_send_string_in_form_with_new_line_3
|
974
|
+
def test_send_string_in_form_with_new_line_3()
|
975
|
+
# Parameters for the API call
|
976
|
+
body = TestNstringEncoding.from_hash(JSON.parse('{"name":"farhan&nouman","field":"QA"}'))
|
977
|
+
|
978
|
+
# Perform the API call through the SDK function
|
979
|
+
result = self.class.controller.send_string_in_form_with_new_line(body)
|
980
|
+
|
981
|
+
# Test response code
|
982
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
983
|
+
|
984
|
+
# Test whether the captured response is as we expected
|
985
|
+
assert_not_nil(result)
|
986
|
+
expected_body = JSON.parse('{"passed":true}')
|
987
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
988
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
989
|
+
end
|
990
|
+
|
991
|
+
# Todo: Add description for test test_send_string_in_form_with_r_1
|
992
|
+
def test_send_string_in_form_with_r_1()
|
993
|
+
# Parameters for the API call
|
994
|
+
body = TestRstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA"}'))
|
995
|
+
|
996
|
+
# Perform the API call through the SDK function
|
997
|
+
result = self.class.controller.send_string_in_form_with_r(body)
|
998
|
+
|
999
|
+
# Test response code
|
1000
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1001
|
+
|
1002
|
+
# Test whether the captured response is as we expected
|
1003
|
+
assert_not_nil(result)
|
1004
|
+
expected_body = JSON.parse('{"passed":true}')
|
1005
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1006
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
# Todo: Add description for test test_send_string_in_form_with_r_2
|
1010
|
+
def test_send_string_in_form_with_r_2()
|
1011
|
+
# Parameters for the API call
|
1012
|
+
body = TestRstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA&Dev"}'))
|
1013
|
+
|
1014
|
+
# Perform the API call through the SDK function
|
1015
|
+
result = self.class.controller.send_string_in_form_with_r(body)
|
1016
|
+
|
1017
|
+
# Test response code
|
1018
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1019
|
+
|
1020
|
+
# Test whether the captured response is as we expected
|
1021
|
+
assert_not_nil(result)
|
1022
|
+
expected_body = JSON.parse('{"passed":true}')
|
1023
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1024
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
# Todo: Add description for test test_send_string_in_form_with_r_3
|
1028
|
+
def test_send_string_in_form_with_r_3()
|
1029
|
+
# Parameters for the API call
|
1030
|
+
body = TestRstringEncoding.from_hash(JSON.parse('{"name":"farhan&nouman","field":"QA"}'))
|
1031
|
+
|
1032
|
+
# Perform the API call through the SDK function
|
1033
|
+
result = self.class.controller.send_string_in_form_with_r(body)
|
1034
|
+
|
1035
|
+
# Test response code
|
1036
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1037
|
+
|
1038
|
+
# Test whether the captured response is as we expected
|
1039
|
+
assert_not_nil(result)
|
1040
|
+
expected_body = JSON.parse('{"passed":true}')
|
1041
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1042
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
# Todo: Add description for test test_send_string_in_form_with_r_n_1
|
1046
|
+
def test_send_string_in_form_with_r_n_1()
|
1047
|
+
# Parameters for the API call
|
1048
|
+
body = TestRNstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA"}'))
|
1049
|
+
|
1050
|
+
# Perform the API call through the SDK function
|
1051
|
+
result = self.class.controller.send_string_in_form_with_r_n(body)
|
1052
|
+
|
1053
|
+
# Test response code
|
1054
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1055
|
+
|
1056
|
+
# Test whether the captured response is as we expected
|
1057
|
+
assert_not_nil(result)
|
1058
|
+
expected_body = JSON.parse('{"passed":true}')
|
1059
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1060
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
# Todo: Add description for test test_send_string_in_form_with_r_n_2
|
1064
|
+
def test_send_string_in_form_with_r_n_2()
|
1065
|
+
# Parameters for the API call
|
1066
|
+
body = TestRNstringEncoding.from_hash(JSON.parse('{"name":"farhan","field":"QA&Dev"}'))
|
1067
|
+
|
1068
|
+
# Perform the API call through the SDK function
|
1069
|
+
result = self.class.controller.send_string_in_form_with_r_n(body)
|
1070
|
+
|
1071
|
+
# Test response code
|
1072
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1073
|
+
|
1074
|
+
# Test whether the captured response is as we expected
|
1075
|
+
assert_not_nil(result)
|
1076
|
+
expected_body = JSON.parse('{"passed":true}')
|
1077
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1078
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Todo: Add description for test test_send_string_in_form_with_r_n_3
|
1082
|
+
def test_send_string_in_form_with_r_n_3()
|
1083
|
+
# Parameters for the API call
|
1084
|
+
body = TestRNstringEncoding.from_hash(JSON.parse('{"name":"farhan&nouman","field":"QA"}'))
|
1085
|
+
|
1086
|
+
# Perform the API call through the SDK function
|
1087
|
+
result = self.class.controller.send_string_in_form_with_r_n(body)
|
1088
|
+
|
1089
|
+
# Test response code
|
1090
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
1091
|
+
|
1092
|
+
# Test whether the captured response is as we expected
|
1093
|
+
assert_not_nil(result)
|
1094
|
+
expected_body = JSON.parse('{"passed":true}')
|
1095
|
+
received_body = JSON.parse(@response_catcher.response.raw_body)
|
1096
|
+
assert(TestHelper.match_body(expected_body, received_body, check_values: true))
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
end
|