Skip to content

Commit 9bf1d95

Browse files
committed
squash
1 parent 5c0764e commit 9bf1d95

23 files changed

+591
-1581
lines changed

src/JsonApiDotNetCore.OpenApi.Client/ApiException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using JetBrains.Annotations;
44

55
// ReSharper disable once CheckNamespace
6-
namespace OpenApiClientTests.Exceptions
6+
namespace JsonApiDotNetCore.OpenApi.Client.Exceptions
77
{
88
// We cannot rely on a generated ApiException as soon as we are generating multiple clients, see https://github.com/RicoSuter/NSwag/issues/2839#issuecomment-776647377.
99
[UsedImplicitly(ImplicitUseTargetFlags.Members)]

test/OpenApiClientTests/LegacyClient/ApiResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Threading.Tasks;
33
using JsonApiDotNetCore.OpenApi.Client;
4-
using OpenApiClientTests.Exceptions;
4+
using JsonApiDotNetCore.OpenApi.Client.Exceptions;
55

66
#pragma warning disable AV1008 // Class should not be static
77

test/OpenApiClientTests/LegacyClient/ResponseTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Threading.Tasks;
77
using FluentAssertions;
88
using FluentAssertions.Specialized;
9-
using OpenApiClientTests.Exceptions;
9+
using JsonApiDotNetCore.OpenApi.Client.Exceptions;
1010
using OpenApiClientTests.LegacyClient.GeneratedCode;
1111
using Xunit;
1212

test/OpenApiClientTests/NamingConvention/KebabCase/KebabCaseRoundTripTests.cs

Lines changed: 0 additions & 67 deletions
This file was deleted.

test/OpenApiClientTests/NamingConvention/KebabCase/NamingConventionFakers.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using Bogus;
3+
using OpenApiTests.NamingConventions;
4+
using TestBuildingBlocks;
5+
6+
// @formatter:wrap_chained_method_calls chop_always
7+
// @formatter:keep_existing_linebreaks true
8+
9+
namespace OpenApiClientTests.NamingConventions.KebabCase
10+
{
11+
internal sealed class NamingConventionFakers : FakerContainer
12+
{
13+
private readonly Lazy<Faker<Supermarket>> _lazySupermarketFaker =
14+
new(() => new Faker<Supermarket>()
15+
.UseSeed(GetFakerSeed())
16+
.RuleFor(supermarket => supermarket.NameOfCity, faker => faker.Address.City())
17+
.RuleFor(supermarket => supermarket.Kind, faker => faker.PickRandom<SupermarketType>()));
18+
19+
private readonly Lazy<Faker<StaffMember>> _lazyStaffMemberFaker =
20+
new(() => new Faker<StaffMember>()
21+
.UseSeed(GetFakerSeed())
22+
.RuleFor(staffMember => staffMember.Name, faker => faker.Address.City())
23+
.RuleFor(staffMember => staffMember.Age, faker => faker.PickRandom<int>()));
24+
25+
public Faker<Supermarket> Supermarket => _lazySupermarketFaker.Value;
26+
public Faker<StaffMember> StaffMember => _lazyStaffMemberFaker.Value;
27+
}
28+
}

test/OpenApiClientTests/OpenApiClientTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</ItemGroup>
3939

4040
<ItemGroup>
41-
<OpenApiReference Include="..\OpenApiTests\NamingConvention\KebabCase\swagger.json">
42-
<Namespace>OpenApiClientTests.NamingConvention.KebabCase.GeneratedCode</Namespace>
41+
<OpenApiReference Include="..\OpenApiTests\NamingConventions\KebabCase\swagger.json">
42+
<Namespace>OpenApiClientTests.NamingConventions.KebabCase.GeneratedCode</Namespace>
4343
<ClassName>KebabCaseClient</ClassName>
4444
<OutputPath>KebabCaseClient.cs</OutputPath>
4545
<CodeGenerator>NSwagCSharp</CodeGenerator>

test/OpenApiTests/LegacyOpenApiIntegration/LegacyOpenApiIntegrationTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public LegacyOpenApiIntegrationTests()
1919
UseController<FlightAttendantsController>();
2020
}
2121

22-
// TODO: This test fails when all tests are openapi tests run in parallel; something isn't going right with the fixtures.
2322
[Fact]
2423
public async Task Retrieved_document_matches_expected_document()
2524
{

test/OpenApiTests/NamingConvention/KebabCase/KebabCaseTests.cs

Lines changed: 0 additions & 204 deletions
This file was deleted.

0 commit comments

Comments
 (0)