@@ -59,10 +59,10 @@ public async Task Cannot_exceed_length_constraint(string firstName)
59
59
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
60
60
61
61
// Assert
62
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
63
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
62
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
63
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
64
64
65
- ErrorObject errorObject = document . Errors . First ( ) ;
65
+ ErrorObject errorObject = response . Errors . First ( ) ;
66
66
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
67
67
errorObject . Detail . Should ( ) . Be ( "The field FirstName must be a string or collection type with a minimum length of '2' and maximum length of '20'." ) ;
68
68
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -97,10 +97,10 @@ public async Task Cannot_exceed_string_length_constraint(string userName)
97
97
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
98
98
99
99
// Assert
100
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
101
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
100
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
101
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
102
102
103
- ErrorObject errorObject = document . Errors . First ( ) ;
103
+ ErrorObject errorObject = response . Errors . First ( ) ;
104
104
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
105
105
errorObject . Detail . Should ( ) . Be ( "The field UserName must be a string with a minimum length of 3 and a maximum length of 18." ) ;
106
106
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -133,10 +133,10 @@ public async Task Cannot_violate_regular_expression_constraint()
133
133
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
134
134
135
135
// Assert
136
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
137
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
136
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
137
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
138
138
139
- ErrorObject errorObject = document . Errors . First ( ) ;
139
+ ErrorObject errorObject = response . Errors . First ( ) ;
140
140
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
141
141
errorObject . Detail . Should ( ) . Be ( "Only letters are allowed." ) ;
142
142
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -169,10 +169,10 @@ public async Task Cannot_use_invalid_credit_card_number()
169
169
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
170
170
171
171
// Assert
172
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
173
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
172
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
173
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
174
174
175
- ErrorObject errorObject = document . Errors . First ( ) ;
175
+ ErrorObject errorObject = response . Errors . First ( ) ;
176
176
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
177
177
errorObject . Detail . Should ( ) . Be ( "The CreditCard field is not a valid credit card number." ) ;
178
178
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -205,10 +205,10 @@ public async Task Cannot_use_invalid_email_address()
205
205
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
206
206
207
207
// Assert
208
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
209
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
208
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
209
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
210
210
211
- ErrorObject errorObject = document . Errors . First ( ) ;
211
+ ErrorObject errorObject = response . Errors . First ( ) ;
212
212
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
213
213
errorObject . Detail . Should ( ) . Be ( "The Email field is not a valid e-mail address." ) ;
214
214
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -242,12 +242,12 @@ public async Task Cannot_exceed_min_length_constraint()
242
242
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
243
243
244
244
// Assert
245
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
246
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
245
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
246
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
247
247
248
248
const int minCharsInBase64 = SocialMediaAccount . MinPasswordCharsInBase64 ;
249
249
250
- ErrorObject errorObject = document . Errors . First ( ) ;
250
+ ErrorObject errorObject = response . Errors . First ( ) ;
251
251
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
252
252
errorObject . Detail . Should ( ) . Be ( $ "The field Password must be a string or array type with a minimum length of '{ minCharsInBase64 } '.") ;
253
253
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -280,12 +280,12 @@ public async Task Cannot_exceed_max_length_constraint()
280
280
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
281
281
282
282
// Assert
283
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
284
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
283
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
284
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
285
285
286
286
const int maxCharsInBase64 = SocialMediaAccount . MaxPasswordCharsInBase64 ;
287
287
288
- ErrorObject errorObject = document . Errors . First ( ) ;
288
+ ErrorObject errorObject = response . Errors . First ( ) ;
289
289
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
290
290
errorObject . Detail . Should ( ) . Be ( $ "The field Password must be a string or array type with a maximum length of '{ maxCharsInBase64 } '.") ;
291
291
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -322,10 +322,10 @@ public async Task Cannot_use_double_outside_of_valid_range(double age)
322
322
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
323
323
324
324
// Assert
325
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
326
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
325
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
326
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
327
327
328
- ErrorObject errorObject = document . Errors . First ( ) ;
328
+ ErrorObject errorObject = response . Errors . First ( ) ;
329
329
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
330
330
errorObject . Detail . Should ( ) . Be ( $ "The field Age must be between { 0.1 } exclusive and { 122.9 } exclusive.") ;
331
331
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -358,10 +358,10 @@ public async Task Cannot_use_relative_url()
358
358
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
359
359
360
360
// Assert
361
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
362
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
361
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
362
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
363
363
364
- ErrorObject errorObject = document . Errors . First ( ) ;
364
+ ErrorObject errorObject = response . Errors . First ( ) ;
365
365
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
366
366
errorObject . Detail . Should ( ) . Be ( "The BackgroundPicture field is not a valid fully-qualified http, https, or ftp URL." ) ;
367
367
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -396,10 +396,10 @@ public async Task Cannot_exceed_collection_length_constraint(int length)
396
396
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
397
397
398
398
// Assert
399
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
400
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
399
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
400
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
401
401
402
- ErrorObject errorObject = document . Errors . First ( ) ;
402
+ ErrorObject errorObject = response . Errors . First ( ) ;
403
403
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
404
404
errorObject . Detail . Should ( ) . Be ( "The field Tags must be a string or collection type with a minimum length of '1' and maximum length of '10'." ) ;
405
405
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -432,10 +432,10 @@ public async Task Cannot_use_non_allowed_value()
432
432
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
433
433
434
434
// Assert
435
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
436
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
435
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
436
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
437
437
438
- ErrorObject errorObject = document . Errors . First ( ) ;
438
+ ErrorObject errorObject = response . Errors . First ( ) ;
439
439
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
440
440
errorObject . Detail . Should ( ) . Be ( "The CountryCode field does not equal any of the values specified in AllowedValuesAttribute." ) ;
441
441
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -468,10 +468,10 @@ public async Task Cannot_use_denied_value()
468
468
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
469
469
470
470
// Assert
471
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
472
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
471
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
472
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
473
473
474
- ErrorObject errorObject = document . Errors . First ( ) ;
474
+ ErrorObject errorObject = response . Errors . First ( ) ;
475
475
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
476
476
errorObject . Detail . Should ( ) . Be ( "The Planet field equals one of the values specified in DeniedValuesAttribute." ) ;
477
477
errorObject . Source . Should ( ) . NotBeNull ( ) ;
@@ -504,10 +504,10 @@ public async Task Cannot_use_TimeSpan_outside_of_valid_range()
504
504
Func < Task > action = ( ) => apiClient . SocialMediaAccounts . PostAsync ( requestBody ) ;
505
505
506
506
// Assert
507
- ErrorResponseDocument document = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
508
- document . Errors . Should ( ) . HaveCount ( 1 ) ;
507
+ ErrorResponseDocument response = ( await action . Should ( ) . ThrowExactlyAsync < ErrorResponseDocument > ( ) ) . Which ;
508
+ response . Errors . Should ( ) . HaveCount ( 1 ) ;
509
509
510
- ErrorObject errorObject = document . Errors . First ( ) ;
510
+ ErrorObject errorObject = response . Errors . First ( ) ;
511
511
errorObject . Title . Should ( ) . Be ( "Input validation failed." ) ;
512
512
errorObject . Detail . Should ( ) . Be ( "The field NextRevalidation must be between 01:00:00 and 05:00:00." ) ;
513
513
errorObject . Source . Should ( ) . NotBeNull ( ) ;
0 commit comments