Refactor media import handlers to utilize ManualInboxTaker for improved functionality
Updated the ImportManualInboxCommandHandler and ImportMoviesCommandHandler to replace direct storage interactions with the ManualInboxTaker, streamlining the import process. This change enhances code clarity and maintains consistency across media import functionalities. Additionally, refactored related tests to accommodate the new handler structure, ensuring robust testing of the import logic.
This commit is contained in:
@@ -37,7 +37,7 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
await using var db = fixture.CreateContext();
|
||||
var result = await new ImportManualInboxCommandHandler(
|
||||
db,
|
||||
storage,
|
||||
new ManualInboxTaker(db, storage),
|
||||
Substitute.For<IMediaProcessingQueue>()
|
||||
).Handle(
|
||||
new ImportManualInboxCommand(
|
||||
@@ -107,7 +107,7 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
await using var db = fixture.CreateContext();
|
||||
var result = await new ImportManualInboxCommandHandler(
|
||||
db,
|
||||
storage,
|
||||
new ManualInboxTaker(db, storage),
|
||||
Substitute.For<IMediaProcessingQueue>()
|
||||
).Handle(
|
||||
new ImportManualInboxCommand(
|
||||
@@ -142,7 +142,7 @@ public sealed class ManualInboxIntegrationTests(PostgresFixture fixture)
|
||||
await using var db = fixture.CreateContext();
|
||||
var result = await new ImportManualInboxCommandHandler(
|
||||
db,
|
||||
storage,
|
||||
new ManualInboxTaker(db, storage),
|
||||
Substitute.For<IMediaProcessingQueue>()
|
||||
).Handle(
|
||||
new ImportManualInboxCommand([new ManualImportItem(name, 4, 12)], showId),
|
||||
|
||||
Reference in New Issue
Block a user