Added abstraction layeer IHtmlLoader. Finished reorganizing test project folder structure.

This commit is contained in:
2025-06-09 00:09:59 -04:00
parent b5d22c3c7e
commit c26ed11bfc
30 changed files with 1966 additions and 132 deletions

View File

@@ -17,12 +17,16 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
var sourceManga = new SourceManga
{
Title = "Fullmetal Alchemist",
Title = new()
{
Name = "Fullmetal Alchemist",
Language = Language.English
},
AlternateTitles =
[
new()
{
Title = "Hagane no Renkinjutsushi",
Name = "Hagane no Renkinjutsushi",
Language = Language.Romaji
}
],
@@ -49,7 +53,10 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
await pipeline.RunAsync(request);
context.Mangas.ShouldHaveSingleItem();
context.MangaTitles.ShouldHaveSingleItem();
context.MangaTitles.Count().ShouldBe(2);
context.MangaTitles.Where(mt => mt.IsPrimary).ShouldHaveSingleItem();
context.MangaTitles.Where(mt => mt.IsPrimary).First().Name.ShouldBe("Fullmetal Alchemist");
context.MangaTitles.Where(mt => mt.IsPrimary).First().Language.ShouldBe(Language.English);
context.Genres.Count().ShouldBe(2);
context.MangaChapters.ShouldHaveSingleItem();
}