Enhance code readability and maintainability by refactoring various components. Update formatting commands in CLAUDE.md for csharpier integration. Simplify method signatures in SegmentFiles, UploadLimits, and multiple endpoint classes for improved clarity. Adjust query handlers and command handlers to streamline parameter handling and enhance consistency across the application.
This commit is contained in:
@@ -29,12 +29,10 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
var storage = Substitute.For<IMediaStorage>();
|
||||
storage
|
||||
.ListManualInbox(Arg.Any<int>())
|
||||
.Returns(
|
||||
[
|
||||
new IMediaStorage.ManualInboxFile($"Сериал/{first}", first, 1000),
|
||||
new IMediaStorage.ManualInboxFile($"Сериал/{second}", second, 1000),
|
||||
]
|
||||
);
|
||||
.Returns([
|
||||
new IMediaStorage.ManualInboxFile($"Сериал/{first}", first, 1000),
|
||||
new IMediaStorage.ManualInboxFile($"Сериал/{second}", second, 1000),
|
||||
]);
|
||||
|
||||
await using var db = fixture.CreateContext();
|
||||
var result = await new ImportManualInboxCommandHandler(
|
||||
@@ -101,12 +99,10 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
var storage = Substitute.For<IMediaStorage>();
|
||||
storage
|
||||
.ListManualInbox(Arg.Any<int>())
|
||||
.Returns(
|
||||
[
|
||||
new IMediaStorage.ManualInboxFile(good, good, 1000),
|
||||
new IMediaStorage.ManualInboxFile("readme.txt", "readme.txt", 10),
|
||||
]
|
||||
);
|
||||
.Returns([
|
||||
new IMediaStorage.ManualInboxFile(good, good, 1000),
|
||||
new IMediaStorage.ManualInboxFile("readme.txt", "readme.txt", 10),
|
||||
]);
|
||||
|
||||
await using var db = fixture.CreateContext();
|
||||
var result = await new ImportManualInboxCommandHandler(
|
||||
@@ -148,7 +144,10 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
db,
|
||||
storage,
|
||||
Substitute.For<IMediaProcessingQueue>()
|
||||
).Handle(new ImportManualInboxCommand([new ManualImportItem(name, 4, 12)], showId), default);
|
||||
).Handle(
|
||||
new ImportManualInboxCommand([new ManualImportItem(name, 4, 12)], showId),
|
||||
default
|
||||
);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
await db.SaveChangesAsync();
|
||||
|
||||
Reference in New Issue
Block a user