@@ -44,7 +44,7 @@ public async Task Default_JsonApi_endpoints_are_exposed()
44
44
}
45
45
46
46
[ Fact ]
47
- public async Task Upload_endpoint_is_exposed ( )
47
+ public async Task Upload_file_endpoint_is_exposed ( )
48
48
{
49
49
// Act
50
50
JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
@@ -97,7 +97,7 @@ public async Task Upload_endpoint_is_exposed()
97
97
}
98
98
99
99
[ Fact ]
100
- public async Task Exists_endpoint_is_exposed ( )
100
+ public async Task File_exists_endpoint_is_exposed ( )
101
101
{
102
102
// Act
103
103
JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
@@ -159,7 +159,7 @@ public async Task Exists_endpoint_is_exposed()
159
159
}
160
160
161
161
[ Fact ]
162
- public async Task Download_endpoint_is_exposed ( )
162
+ public async Task Download_file_endpoint_is_exposed ( )
163
163
{
164
164
// Act
165
165
JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
@@ -227,4 +227,139 @@ public async Task Download_endpoint_is_exposed()
227
227
}
228
228
""" ) ;
229
229
}
230
+
231
+ [ Fact ]
232
+ public async Task Send_email_endpoint_is_exposed ( )
233
+ {
234
+ // Act
235
+ JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
236
+
237
+ // Assert
238
+ document . Should ( ) . ContainPath ( "paths./emails/send.post" ) . Should ( ) . BeJson ( """
239
+ {
240
+ "tags": [
241
+ "emails"
242
+ ],
243
+ "description": "Sends an email to the specified recipient.",
244
+ "operationId": "sendEmail",
245
+ "requestBody": {
246
+ "content": {
247
+ "application/json": {
248
+ "schema": {
249
+ "allOf": [
250
+ {
251
+ "$ref": "#/components/schemas/email"
252
+ }
253
+ ],
254
+ "description": "The email to send."
255
+ }
256
+ }
257
+ },
258
+ "required": true
259
+ },
260
+ "responses": {
261
+ "200": {
262
+ "description": "OK"
263
+ },
264
+ "400": {
265
+ "description": "Bad Request",
266
+ "content": {
267
+ "application/problem+json": {
268
+ "schema": {
269
+ "$ref": "#/components/schemas/httpValidationProblemDetails"
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ """ ) ;
277
+ }
278
+
279
+ [ Fact ]
280
+ public async Task Emails_sent_since_endpoint_is_exposed ( )
281
+ {
282
+ // Act
283
+ JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
284
+
285
+ // Assert
286
+ document . Should ( ) . ContainPath ( "paths./emails/sent-since.get" ) . Should ( ) . BeJson ( """
287
+ {
288
+ "tags": [
289
+ "emails"
290
+ ],
291
+ "description": "Gets all emails sent since the specified date/time.",
292
+ "operationId": "getSentSince",
293
+ "parameters": [
294
+ {
295
+ "name": "sinceUtc",
296
+ "in": "query",
297
+ "description": "The date/time (in UTC) since which the email was sent.",
298
+ "required": true,
299
+ "schema": {
300
+ "type": "string",
301
+ "description": "The date/time (in UTC) since which the email was sent.",
302
+ "format": "date-time"
303
+ }
304
+ }
305
+ ],
306
+ "responses": {
307
+ "200": {
308
+ "description": "OK",
309
+ "content": {
310
+ "application/json": {
311
+ "schema": {
312
+ "type": "array",
313
+ "items": {
314
+ "$ref": "#/components/schemas/email"
315
+ }
316
+ }
317
+ }
318
+ }
319
+ },
320
+ "400": {
321
+ "description": "Bad Request",
322
+ "content": {
323
+ "application/problem+json": {
324
+ "schema": {
325
+ "$ref": "#/components/schemas/httpValidationProblemDetails"
326
+ }
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ """ ) ;
333
+
334
+ document . Should ( ) . ContainPath ( "paths./emails/sent-since.head" ) . Should ( ) . BeJson ( """
335
+ {
336
+ "tags": [
337
+ "emails"
338
+ ],
339
+ "description": "Gets all emails sent since the specified date/time.",
340
+ "operationId": "tryGetSentSince",
341
+ "parameters": [
342
+ {
343
+ "name": "sinceUtc",
344
+ "in": "query",
345
+ "description": "The date/time (in UTC) since which the email was sent.",
346
+ "required": true,
347
+ "schema": {
348
+ "type": "string",
349
+ "description": "The date/time (in UTC) since which the email was sent.",
350
+ "format": "date-time"
351
+ }
352
+ }
353
+ ],
354
+ "responses": {
355
+ "200": {
356
+ "description": "OK"
357
+ },
358
+ "400": {
359
+ "description": "Bad Request"
360
+ }
361
+ }
362
+ }
363
+ """ ) ;
364
+ }
230
365
}
0 commit comments