Skip to content

Commit e1cafc9

Browse files
committed
Consistency renames in tests
1 parent 9fbe809 commit e1cafc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+154
-154
lines changed

test/OpenApiKiotaEndToEndTests/Headers/ETagTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
namespace OpenApiKiotaEndToEndTests.Headers;
1616

17-
public sealed class ETagTests : IClassFixture<IntegrationTestContext<OpenApiStartup<HeadersDbContext>, HeadersDbContext>>
17+
public sealed class ETagTests : IClassFixture<IntegrationTestContext<OpenApiStartup<HeaderDbContext>, HeaderDbContext>>
1818
{
19-
private readonly IntegrationTestContext<OpenApiStartup<HeadersDbContext>, HeadersDbContext> _testContext;
19+
private readonly IntegrationTestContext<OpenApiStartup<HeaderDbContext>, HeaderDbContext> _testContext;
2020
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
2121
private readonly HeaderFakers _fakers = new();
2222

23-
public ETagTests(IntegrationTestContext<OpenApiStartup<HeadersDbContext>, HeadersDbContext> testContext, ITestOutputHelper testOutputHelper)
23+
public ETagTests(IntegrationTestContext<OpenApiStartup<HeaderDbContext>, HeaderDbContext> testContext, ITestOutputHelper testOutputHelper)
2424
{
2525
_testContext = testContext;
2626
_requestAdapterFactory = new TestableHttpClientRequestAdapterFactory(testOutputHelper);

test/OpenApiKiotaEndToEndTests/QueryStrings/FilterTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
namespace OpenApiKiotaEndToEndTests.QueryStrings;
1313

14-
public sealed class FilterTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext>>
14+
public sealed class FilterTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext>>
1515
{
16-
private readonly IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> _testContext;
16+
private readonly IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> _testContext;
1717
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
1818
private readonly QueryStringFakers _fakers = new();
1919

20-
public FilterTests(IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper)
20+
public FilterTests(IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> testContext, ITestOutputHelper testOutputHelper)
2121
{
2222
_testContext = testContext;
2323
_requestAdapterFactory = new TestableHttpClientRequestAdapterFactory(testOutputHelper);

test/OpenApiKiotaEndToEndTests/QueryStrings/IncludeTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
namespace OpenApiKiotaEndToEndTests.QueryStrings;
1212

13-
public sealed class IncludeTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext>>
13+
public sealed class IncludeTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext>>
1414
{
15-
private readonly IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> _testContext;
15+
private readonly IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> _testContext;
1616
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
1717
private readonly QueryStringFakers _fakers = new();
1818

19-
public IncludeTests(IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper)
19+
public IncludeTests(IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> testContext, ITestOutputHelper testOutputHelper)
2020
{
2121
_testContext = testContext;
2222
_requestAdapterFactory = new TestableHttpClientRequestAdapterFactory(testOutputHelper);

test/OpenApiKiotaEndToEndTests/QueryStrings/PaginationTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
namespace OpenApiKiotaEndToEndTests.QueryStrings;
1313

14-
public sealed class PaginationTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext>>
14+
public sealed class PaginationTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext>>
1515
{
16-
private readonly IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> _testContext;
16+
private readonly IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> _testContext;
1717
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
1818
private readonly QueryStringFakers _fakers = new();
1919

20-
public PaginationTests(IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper)
20+
public PaginationTests(IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> testContext, ITestOutputHelper testOutputHelper)
2121
{
2222
_testContext = testContext;
2323
_requestAdapterFactory = new TestableHttpClientRequestAdapterFactory(testOutputHelper);

test/OpenApiKiotaEndToEndTests/QueryStrings/SortTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
namespace OpenApiKiotaEndToEndTests.QueryStrings;
1313

14-
public sealed class SortTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext>>
14+
public sealed class SortTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext>>
1515
{
16-
private readonly IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> _testContext;
16+
private readonly IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> _testContext;
1717
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
1818
private readonly QueryStringFakers _fakers = new();
1919

20-
public SortTests(IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper)
20+
public SortTests(IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> testContext, ITestOutputHelper testOutputHelper)
2121
{
2222
_testContext = testContext;
2323
_requestAdapterFactory = new TestableHttpClientRequestAdapterFactory(testOutputHelper);

test/OpenApiKiotaEndToEndTests/QueryStrings/SparseFieldSetTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
namespace OpenApiKiotaEndToEndTests.QueryStrings;
1212

13-
public sealed class SparseFieldSetTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext>>
13+
public sealed class SparseFieldSetTests : IClassFixture<IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext>>
1414
{
15-
private readonly IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> _testContext;
15+
private readonly IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> _testContext;
1616
private readonly TestableHttpClientRequestAdapterFactory _requestAdapterFactory;
1717
private readonly QueryStringFakers _fakers = new();
1818

19-
public SparseFieldSetTests(IntegrationTestContext<OpenApiStartup<QueryStringsDbContext>, QueryStringsDbContext> testContext,
19+
public SparseFieldSetTests(IntegrationTestContext<OpenApiStartup<QueryStringDbContext>, QueryStringDbContext> testContext,
2020
ITestOutputHelper testOutputHelper)
2121
{
2222
_testContext = testContext;

test/OpenApiNSwagClientTests/LegacyClient/GeneratedCode/IOpenApiClient.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using JsonApiDotNetCore.OpenApi.Client.NSwag;
2+
3+
namespace OpenApiNSwagClientTests.LegacyOpenApi.GeneratedCode;
4+
5+
// ReSharper disable once MemberCanBeInternal
6+
public partial interface ILegacyClient : IJsonApiClient;

test/OpenApiNSwagClientTests/LegacyClient/GeneratedCode/OpenApiClient.cs renamed to test/OpenApiNSwagClientTests/LegacyOpenApi/GeneratedCode/LegacyClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using JsonApiDotNetCore.OpenApi.Client.NSwag;
22
using Newtonsoft.Json;
33

4-
namespace OpenApiNSwagClientTests.LegacyClient.GeneratedCode;
4+
namespace OpenApiNSwagClientTests.LegacyOpenApi.GeneratedCode;
55

6-
internal partial class OpenApiClient : JsonApiClient
6+
internal partial class LegacyClient : JsonApiClient
77
{
88
partial void UpdateJsonSerializerSettings(JsonSerializerSettings settings)
99
{

test/OpenApiNSwagClientTests/LegacyClient/PartialAttributeSerializationLifetimeTests.cs renamed to test/OpenApiNSwagClientTests/LegacyOpenApi/PartialAttributeSerializationLifetimeTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System.Net;
22
using FluentAssertions;
33
using JsonApiDotNetCore.OpenApi.Client.NSwag;
4-
using OpenApiNSwagClientTests.LegacyClient.GeneratedCode;
4+
using OpenApiNSwagClientTests.LegacyOpenApi.GeneratedCode;
55
using TestBuildingBlocks;
66
using Xunit;
77

8-
namespace OpenApiNSwagClientTests.LegacyClient;
8+
namespace OpenApiNSwagClientTests.LegacyOpenApi;
99

1010
public sealed class PartialAttributeSerializationLifetimeTests
1111
{
@@ -14,7 +14,7 @@ public async Task Disposed_registration_does_not_affect_request()
1414
{
1515
// Arrange
1616
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
17-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
17+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
1818

1919
const string airplaneId = "XUuiP";
2020

@@ -58,7 +58,7 @@ public async Task Registration_can_be_used_for_multiple_requests()
5858
{
5959
// Arrange
6060
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
61-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
61+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
6262

6363
const string airplaneId = "XUuiP";
6464

@@ -107,7 +107,7 @@ public async Task Request_is_unaffected_by_registration_for_different_document_o
107107
{
108108
// Arrange
109109
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
110-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
110+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
111111

112112
const string airplaneId1 = "XUuiP";
113113

@@ -164,7 +164,7 @@ public async Task Attribute_values_can_be_changed_after_registration()
164164
{
165165
// Arrange
166166
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
167-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
167+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
168168

169169
const string airplaneId = "XUuiP";
170170

@@ -209,7 +209,7 @@ public async Task Registration_is_unaffected_by_successive_registration_for_docu
209209
{
210210
// Arrange
211211
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
212-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
212+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
213213

214214
const string airplaneId1 = "XUuiP";
215215

@@ -262,7 +262,7 @@ public async Task Registration_is_unaffected_by_preceding_disposed_registration_
262262
{
263263
// Arrange
264264
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
265-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
265+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
266266

267267
const string airplaneId1 = "XUuiP";
268268

@@ -326,7 +326,7 @@ public async Task Registration_is_unaffected_by_preceding_disposed_registration_
326326
{
327327
// Arrange
328328
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
329-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
329+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
330330

331331
var requestDocument1 = new AirplanePostRequestDocument
332332
{
@@ -390,7 +390,7 @@ public async Task Registration_is_unaffected_by_preceding_registration_for_diffe
390390
{
391391
// Arrange
392392
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
393-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
393+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
394394

395395
const string airplaneId1 = "XUuiP";
396396

test/OpenApiNSwagClientTests/LegacyClient/RequestTests.cs renamed to test/OpenApiNSwagClientTests/LegacyOpenApi/RequestTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
using JsonApiDotNetCore.Middleware;
66
using JsonApiDotNetCore.OpenApi.Client.NSwag;
77
using Microsoft.Net.Http.Headers;
8-
using OpenApiNSwagClientTests.LegacyClient.GeneratedCode;
8+
using OpenApiNSwagClientTests.LegacyOpenApi.GeneratedCode;
99
using TestBuildingBlocks;
1010
using Xunit;
1111

12-
namespace OpenApiNSwagClientTests.LegacyClient;
12+
namespace OpenApiNSwagClientTests.LegacyOpenApi;
1313

1414
public sealed class RequestTests
1515
{
@@ -20,7 +20,7 @@ public async Task Getting_resource_collection_produces_expected_request()
2020
{
2121
// Arrange
2222
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
23-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
23+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
2424

2525
// Act
2626
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCollectionAsync(null, null));
@@ -40,7 +40,7 @@ public async Task Getting_resource_produces_expected_request()
4040
const string flightId = "ZvuH1";
4141

4242
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
43-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
43+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
4444

4545
// Act
4646
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightAsync(flightId, null, null));
@@ -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 apiClient = new OpenApiClient(wrapper.HttpClient);
61+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
6262

6363
var requestDocument = new FlightPostRequestDocument
6464
{
@@ -127,7 +127,7 @@ public async Task Partial_posting_resource_produces_expected_request()
127127
{
128128
// Arrange
129129
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
130-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
130+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
131131

132132
const char euroSign = '\x20AC';
133133
const char checkMark = '\x2713';
@@ -193,7 +193,7 @@ public async Task Partial_patching_resource_produces_expected_request()
193193
var lastServicedAt = 1.January(2021).At(15, 23, 5, 33).ToDateTimeOffset(4.Hours());
194194

195195
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
196-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
196+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
197197

198198
var requestDocument = new AirplanePatchRequestDocument
199199
{
@@ -247,7 +247,7 @@ public async Task Deleting_resource_produces_expected_request()
247247
const string flightId = "ZvuH1";
248248

249249
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
250-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
250+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
251251

252252
// Act
253253
await apiClient.DeleteFlightAsync(flightId);
@@ -266,7 +266,7 @@ public async Task Getting_secondary_resource_produces_expected_request()
266266
const string flightId = "ZvuH1";
267267

268268
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
269-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
269+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
270270

271271
// Act
272272
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserAsync(flightId, null, null));
@@ -286,7 +286,7 @@ public async Task Getting_secondary_resources_produces_expected_request()
286286
const string flightId = "ZvuH1";
287287

288288
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
289-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
289+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
290290

291291
// Act
292292
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersAsync(flightId, null, null));
@@ -306,7 +306,7 @@ public async Task Getting_ToOne_relationship_produces_expected_request()
306306
const string flightId = "ZvuH1";
307307

308308
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
309-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
309+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
310310

311311
// Act
312312
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserRelationshipAsync(flightId, null, null));
@@ -326,7 +326,7 @@ public async Task Patching_ToOne_relationship_produces_expected_request()
326326
const string flightId = "ZvuH1";
327327

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

331331
var requestDocument = new ToOneFlightAttendantInRequest
332332
{
@@ -365,7 +365,7 @@ public async Task Getting_ToMany_relationship_produces_expected_request()
365365
const string flightId = "ZvuH1";
366366

367367
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
368-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
368+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
369369

370370
// Act
371371
_ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId, null, null));
@@ -385,7 +385,7 @@ public async Task Posting_ToMany_relationship_produces_expected_request()
385385
const string flightId = "ZvuH1";
386386

387387
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
388-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
388+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
389389

390390
var requestDocument = new ToManyFlightAttendantInRequest
391391
{
@@ -438,7 +438,7 @@ public async Task Patching_ToMany_relationship_produces_expected_request()
438438
const string flightId = "ZvuH1";
439439

440440
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
441-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
441+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
442442

443443
var requestDocument = new ToManyFlightAttendantInRequest
444444
{
@@ -491,7 +491,7 @@ public async Task Deleting_ToMany_relationship_produces_expected_request()
491491
const string flightId = "ZvuH1";
492492

493493
using var wrapper = FakeHttpClientWrapper.Create(HttpStatusCode.NoContent, null);
494-
IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient);
494+
ILegacyClient apiClient = new LegacyClient(wrapper.HttpClient);
495495

496496
var requestDocument = new ToManyFlightAttendantInRequest
497497
{

0 commit comments

Comments
 (0)