7
7
using FluentAssertions . Extensions ;
8
8
using JsonApiDotNetCore . Middleware ;
9
9
using Microsoft . Net . Http . Headers ;
10
- using OpenApiTests . ClientLibrary . GeneratedCode ;
10
+ using OpenApiClientTests . LegacyClient . GeneratedCode ;
11
11
using TestBuildingBlocks ;
12
12
using Xunit ;
13
13
14
14
#pragma warning disable AV1500 // Member or local function contains too many statements
15
15
16
- namespace OpenApiTests . ClientLibrary
16
+ namespace OpenApiClientTests . LegacyClient
17
17
{
18
18
public sealed class RequestTests
19
19
{
@@ -24,7 +24,7 @@ public async Task Getting_resource_collection_produces_expected_request()
24
24
{
25
25
// Arrange
26
26
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
27
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
27
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
28
28
29
29
// Act
30
30
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightCollectionAsync ( ) ) ;
@@ -43,7 +43,7 @@ public async Task Getting_resource_produces_expected_request()
43
43
const int flightId = 8712 ;
44
44
45
45
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
46
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
46
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
47
47
48
48
// Act
49
49
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightAsync ( flightId ) ) ;
@@ -60,7 +60,7 @@ public async Task Partial_posting_resource_with_selected_relationships_produces_
60
60
{
61
61
// Arrange
62
62
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
63
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
63
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
64
64
65
65
var requestDocument = new FlightPostRequestDocument
66
66
{
@@ -102,7 +102,7 @@ public async Task Partial_posting_resource_produces_expected_request()
102
102
{
103
103
// Arrange
104
104
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
105
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
105
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
106
106
107
107
const char euroSign = '\x20AC ' ;
108
108
const char checkMark = '\x2713 ' ;
@@ -165,7 +165,7 @@ public async Task Partial_patching_resource_produces_expected_request()
165
165
var manufacturedAt = 1 . January ( 2021 ) . At ( 15 , 23 , 5 , 33 ) . ToDateTimeOffset ( 4 . Hours ( ) ) ;
166
166
167
167
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
168
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
168
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
169
169
170
170
var requestDocument = new AirplanePatchRequestDocument
171
171
{
@@ -217,7 +217,7 @@ public async Task Deleting_resource_produces_expected_request()
217
217
const int flightId = 8712 ;
218
218
219
219
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
220
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
220
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
221
221
222
222
// Act
223
223
await apiClient . DeleteFlightAsync ( flightId ) ;
@@ -235,7 +235,7 @@ public async Task Getting_secondary_resource_produces_expected_request()
235
235
const int flightId = 8712 ;
236
236
237
237
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
238
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
238
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
239
239
240
240
// Act
241
241
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightOperatingAirplaneAsync ( flightId ) ) ;
@@ -254,7 +254,7 @@ public async Task Getting_secondary_resources_produces_expected_request()
254
254
const int flightId = 8712 ;
255
255
256
256
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
257
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
257
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
258
258
259
259
// Act
260
260
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightFlightAttendantsAsync ( flightId ) ) ;
@@ -273,7 +273,7 @@ public async Task Getting_ToOne_relationship_produces_expected_request()
273
273
const int flightId = 8712 ;
274
274
275
275
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
276
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
276
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
277
277
278
278
// Act
279
279
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightOperatingAirplaneRelationshipAsync ( flightId ) ) ;
@@ -292,7 +292,7 @@ public async Task Patching_ToOne_relationship_produces_expected_request()
292
292
const int flightId = 8712 ;
293
293
294
294
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
295
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
295
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
296
296
297
297
var requestDocument = new ToOneAirplaneRequestData
298
298
{
@@ -328,7 +328,7 @@ public async Task Getting_ToMany_relationship_produces_expected_request()
328
328
const int flightId = 8712 ;
329
329
330
330
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
331
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
331
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
332
332
333
333
// Act
334
334
_ = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetFlightFlightAttendantsRelationshipAsync ( flightId ) ) ;
@@ -347,7 +347,7 @@ public async Task Posting_ToMany_relationship_produces_expected_request()
347
347
const int flightId = 8712 ;
348
348
349
349
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
350
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
350
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
351
351
352
352
var requestDocument = new ToManyFlightAttendantRequestData
353
353
{
@@ -397,7 +397,7 @@ public async Task Patching_ToMany_relationship_produces_expected_request()
397
397
const int flightId = 8712 ;
398
398
399
399
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
400
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
400
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
401
401
402
402
var requestDocument = new ToManyFlightAttendantRequestData
403
403
{
@@ -447,7 +447,7 @@ public async Task Deleting_ToMany_relationship_produces_expected_request()
447
447
const int flightId = 8712 ;
448
448
449
449
using var wrapper = FakeHttpClientWrapper . Create ( HttpStatusCode . NoContent , null ) ;
450
- IOpenApiClient apiClient = new OpenApiClient ( wrapper . HttpClient ) ;
450
+ ILegacyClient apiClient = new GeneratedCode . LegacyClient ( wrapper . HttpClient ) ;
451
451
452
452
var requestDocument = new ToManyFlightAttendantRequestData
453
453
{
0 commit comments