Skip to content

Commit 9a090eb

Browse files
Reorganize snapshots (#3791)
Move snapshots missed from #3790.
1 parent dfc2660 commit 9a090eb

17 files changed

+5
-3
lines changed

test/Swashbuckle.AspNetCore.IntegrationTests/CodeGenerationTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace Swashbuckle.AspNetCore.IntegrationTests;
1212
/// </summary>
1313
public class CodeGenerationTests(ITestOutputHelper outputHelper)
1414
{
15+
private const string SnapshotsDirectory = "snapshots/code";
16+
1517
public static TheoryData<ClientGeneratorTool, string> SnapshotTestCases()
1618
{
1719
var testCases = new TheoryData<ClientGeneratorTool, string>();
@@ -72,7 +74,7 @@ await VerifyDirectory(
7274
pattern: "*.cs",
7375
include: (p) => !p.Contains("bin") && !p.Contains("obj"),
7476
options: new() { RecurseSubdirectories = true })
75-
.UseDirectory("snapshots/code")
77+
.UseDirectory(SnapshotsDirectory)
7678
.UseFileName($"{nameof(GeneratesValidClient)}_{hashString}")
7779
.AddScrubber((builder) =>
7880
{
@@ -94,7 +96,7 @@ public async Task VerifyKiotaTodoAppClient()
9496
await VerifyDirectory(
9597
Path.Combine(GetProjectRoot(), "KiotaTodoClient"),
9698
pattern: "*.cs",
97-
options: new() { RecurseSubdirectories = true }).UseDirectory("snapshots");
99+
options: new() { RecurseSubdirectories = true }).UseDirectory(SnapshotsDirectory);
98100
}
99101

100102
[Fact]
@@ -103,7 +105,7 @@ public async Task VerifyNSwagTodoAppClient()
103105
await VerifyDirectory(
104106
Path.Combine(GetProjectRoot(), "NSwagTodoClient"),
105107
pattern: "*.cs",
106-
options: new() { RecurseSubdirectories = true }).UseDirectory("snapshots");
108+
options: new() { RecurseSubdirectories = true }).UseDirectory(SnapshotsDirectory);
107109
}
108110

109111
private static string GetProjectRoot() =>

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/ApiRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/ApiRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Find/FindRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Find/FindRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/GetAfter/GetAfterRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/GetAfter/GetAfterRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/Complete/CompleteRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/Complete/CompleteRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/ItemsItemRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/ItemsItemRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/Priority/PriorityRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/Item/Priority/PriorityRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/ItemsRequestBuilder.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Api/Items/ItemsRequestBuilder.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/KiotaTodoApiClient.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/KiotaTodoApiClient.verified.cs

File renamed without changes.

test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/CodeGenerationTests.VerifyKiotaTodoAppClient/Models/CreateTodoItemModel.verified.cs renamed to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/code/CodeGenerationTests.VerifyKiotaTodoAppClient/Models/CreateTodoItemModel.verified.cs

File renamed without changes.

0 commit comments

Comments
 (0)