Scanner Fixes (#3619)

Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
Joe Milazzo 2025-03-12 17:25:15 -05:00 committed by GitHub
parent b4061e3711
commit ab540c0ea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 340 additions and 19 deletions

View file

@ -63,10 +63,10 @@ public class ScannerHelper
return library;
}
public ScannerService CreateServices()
public ScannerService CreateServices(DirectoryService ds = null, IFileSystem fs = null)
{
var fs = new FileSystem();
var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), fs);
fs ??= new FileSystem();
ds ??= new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), fs);
var archiveService = new ArchiveService(Substitute.For<ILogger<ArchiveService>>(), ds,
Substitute.For<IImageService>(), Substitute.For<IMediaErrorService>());
var readingItemService = new ReadingItemService(archiveService, Substitute.For<IBookService>(),
@ -133,7 +133,7 @@ public class ScannerHelper
_testOutputHelper.WriteLine($"Test Directory Path: {testDirectory}");
return testDirectory;
return Path.GetFullPath(testDirectory);
}