Added abstraction layeer IHtmlLoader. Finished reorganizing test project folder structure.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user