A ton of random bugs and polish (#3668)

This commit is contained in:
Joe Milazzo 2025-03-23 17:06:20 -05:00 committed by GitHub
parent b45d92ea5c
commit de651215f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
144 changed files with 852 additions and 848 deletions

View file

@ -1,7 +1,6 @@
using System.IO;
using System.IO.Abstractions;
using API.Services;
using EasyCaching.Core;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Xunit;
@ -92,18 +91,17 @@ public class BookServiceTests
Assert.Equal("Georges Bizet \\(1838-1875\\)", comicInfo.Writer);
}
// TODO: Get the file from microtherion
// [Fact]
// public void ShouldUsePdfInfoDict()
// {
// var testDirectory = Path.Join(Directory.GetCurrentDirectory(), "../../../Services/Test Data/ScannerService/Library/Books/PDFs");
// var document = Path.Join(testDirectory, "Rollo at Work SP01.pdf");
// var comicInfo = _bookService.GetComicInfo(document);
// Assert.NotNull(comicInfo);
// Assert.Equal("Rollo at Work", comicInfo.Title);
// Assert.Equal("Jacob Abbott", comicInfo.Writer);
// Assert.Equal(2008, comicInfo.Year);
// }
//[Fact]
public void ShouldUsePdfInfoDict()
{
var testDirectory = Path.Join(Directory.GetCurrentDirectory(), "../../../Services/Test Data/ScannerService/Library/Books/PDFs");
var document = Path.Join(testDirectory, "Rollo at Work SP01.pdf");
var comicInfo = _bookService.GetComicInfo(document);
Assert.NotNull(comicInfo);
Assert.Equal("Rollo at Work", comicInfo.Title);
Assert.Equal("Jacob Abbott", comicInfo.Writer);
Assert.Equal(2008, comicInfo.Year);
}
[Fact]
public void ShouldHandleIndirectPdfObjects()