Skip to content

Commit 8ceff7b

Browse files
committed
fixed failed automatic rename 'openApiOpenApi'
1 parent a83de89 commit 8ceff7b

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/OpenApiClientTests/LegacyClient/RequestTests.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public async Task Getting_resource_collection_produces_expected_request()
2222
{
2323
// Arrange
2424
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
25-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
25+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
2626

2727
// Act
28-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightCollectionAsync());
28+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightCollectionAsync());
2929

3030
// Assert
3131
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -41,10 +41,10 @@ public async Task Getting_resource_produces_expected_request()
4141
const string flightId = "ZvuH1";
4242

4343
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
44-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
44+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
4545

4646
// Act
47-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightAsync(flightId));
47+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightAsync(flightId));
4848

4949
// Assert
5050
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -58,7 +58,7 @@ public async Task Partial_posting_resource_with_selected_relationships_produces_
5858
{
5959
// Arrange
6060
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
61-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
61+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
6262

6363
var requestDocument = new FlightPostRequestDocument
6464
{
@@ -73,7 +73,7 @@ public async Task Partial_posting_resource_with_selected_relationships_produces_
7373
};
7474

7575
// Act
76-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.PostFlightAsync(requestDocument));
76+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.PostFlightAsync(requestDocument));
7777

7878
// Assert
7979
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -163,7 +163,7 @@ public async Task Partial_patching_resource_produces_expected_request()
163163
var lastServicedAt = 1.January(2021).At(15, 23, 5, 33).ToDateTimeOffset(4.Hours());
164164

165165
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
166-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
166+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
167167

168168
var requestDocument = new AirplanePatchRequestDocument
169169
{
@@ -178,12 +178,12 @@ public async Task Partial_patching_resource_produces_expected_request()
178178
}
179179
};
180180

181-
using (apiOpenApiClient.RegisterAttributesForRequestDocument<AirplanePatchRequestDocument, AirplaneAttributesInPatchRequest>(requestDocument,
181+
using (openApiClient.RegisterAttributesForRequestDocument<AirplanePatchRequestDocument, AirplaneAttributesInPatchRequest>(requestDocument,
182182
airplane => airplane.SerialNumber, airplane => airplane.LastServicedAt, airplane => airplane.IsInMaintenance,
183183
airplane => airplane.AirtimeInHours))
184184
{
185185
// Act
186-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.PatchAirplaneAsync(airplaneId, requestDocument));
186+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.PatchAirplaneAsync(airplaneId, requestDocument));
187187
}
188188

189189
// Assert
@@ -215,10 +215,10 @@ public async Task Deleting_resource_produces_expected_request()
215215
const string flightId = "ZvuH1";
216216

217217
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
218-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
218+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
219219

220220
// Act
221-
await apiOpenApiClient.DeleteFlightAsync(flightId);
221+
await openApiClient.DeleteFlightAsync(flightId);
222222

223223
// Assert
224224
wrapper.Request.Method.Should().Be(HttpMethod.Delete);
@@ -233,10 +233,10 @@ public async Task Getting_secondary_resource_produces_expected_request()
233233
const string flightId = "ZvuH1";
234234

235235
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
236-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
236+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
237237

238238
// Act
239-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightOperatingAirplaneAsync(flightId));
239+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightOperatingAirplaneAsync(flightId));
240240

241241
// Assert
242242
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -252,10 +252,10 @@ public async Task Getting_secondary_resources_produces_expected_request()
252252
const string flightId = "ZvuH1";
253253

254254
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
255-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
255+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
256256

257257
// Act
258-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightCabinCrewMembersAsync(flightId));
258+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightCabinCrewMembersAsync(flightId));
259259

260260
// Assert
261261
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -271,10 +271,10 @@ public async Task Getting_ToOne_relationship_produces_expected_request()
271271
const string flightId = "ZvuH1";
272272

273273
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
274-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
274+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
275275

276276
// Act
277-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightOperatingAirplaneRelationshipAsync(flightId));
277+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightOperatingAirplaneRelationshipAsync(flightId));
278278

279279
// Assert
280280
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -290,7 +290,7 @@ public async Task Patching_ToOne_relationship_produces_expected_request()
290290
const string flightId = "ZvuH1";
291291

292292
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
293-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
293+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
294294

295295
var requestDocument = new ToOneAirplaneRequestData
296296
{
@@ -302,7 +302,7 @@ public async Task Patching_ToOne_relationship_produces_expected_request()
302302
};
303303

304304
// Act
305-
await apiOpenApiClient.PatchFlightOperatingAirplaneRelationshipAsync(flightId, requestDocument);
305+
await openApiClient.PatchFlightOperatingAirplaneRelationshipAsync(flightId, requestDocument);
306306

307307
// Assert
308308
wrapper.Request.Method.Should().Be(HttpMethod.Patch);
@@ -326,10 +326,10 @@ public async Task Getting_ToMany_relationship_produces_expected_request()
326326
const string flightId = "ZvuH1";
327327

328328
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
329-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
329+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
330330

331331
// Act
332-
_ = await ApiResponse.TranslateAsync(async () => await apiOpenApiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId));
332+
_ = await ApiResponse.TranslateAsync(async () => await openApiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId));
333333

334334
// Assert
335335
wrapper.Request.Headers.GetValue(HeaderNames.Accept).Should().Be(HeaderConstants.MediaType);
@@ -345,7 +345,7 @@ public async Task Posting_ToMany_relationship_produces_expected_request()
345345
const string flightId = "ZvuH1";
346346

347347
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
348-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
348+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
349349

350350
var requestDocument = new ToManyFlightAttendantRequestData
351351
{
@@ -365,7 +365,7 @@ public async Task Posting_ToMany_relationship_produces_expected_request()
365365
};
366366

367367
// Act
368-
await apiOpenApiClient.PostFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
368+
await openApiClient.PostFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
369369

370370
// Assert
371371
wrapper.Request.Method.Should().Be(HttpMethod.Post);
@@ -395,7 +395,7 @@ public async Task Patching_ToMany_relationship_produces_expected_request()
395395
const string flightId = "ZvuH1";
396396

397397
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
398-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
398+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
399399

400400
var requestDocument = new ToManyFlightAttendantRequestData
401401
{
@@ -415,7 +415,7 @@ public async Task Patching_ToMany_relationship_produces_expected_request()
415415
};
416416

417417
// Act
418-
await apiOpenApiClient.PatchFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
418+
await openApiClient.PatchFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
419419

420420
// Assert
421421
wrapper.Request.Method.Should().Be(HttpMethod.Patch);
@@ -445,7 +445,7 @@ public async Task Deleting_ToMany_relationship_produces_expected_request()
445445
const string flightId = "ZvuH1";
446446

447447
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
448-
IOpenApiClient apiOpenApiClient = new OpenApiClient(wrapper.HttpClient);
448+
IOpenApiClient openApiClient = new OpenApiClient(wrapper.HttpClient);
449449

450450
var requestDocument = new ToManyFlightAttendantRequestData
451451
{
@@ -465,7 +465,7 @@ public async Task Deleting_ToMany_relationship_produces_expected_request()
465465
};
466466

467467
// Act
468-
await apiOpenApiClient.DeleteFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
468+
await openApiClient.DeleteFlightCabinCrewMembersRelationshipAsync(flightId, requestDocument);
469469

470470
// Assert
471471
wrapper.Request.Method.Should().Be(HttpMethod.Delete);

0 commit comments

Comments
 (0)