Added common language enum. Fixed "romaji" spelling. More UI updates.

This commit is contained in:
2025-06-08 11:13:52 -04:00
parent 70513559cb
commit b5d22c3c7e
20 changed files with 224 additions and 55 deletions

View File

@@ -1,7 +1,9 @@
using MangaReader.Core.Data;
using MangaReader.Core.Common;
using MangaReader.Core.Data;
using MangaReader.Core.Metadata;
using MangaReader.Core.Pipeline;
using MangaReader.Tests.Utilities;
using Shouldly;
namespace MangaReader.Tests.Pipeline;
@@ -21,7 +23,7 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
new()
{
Title = "Hagane no Renkinjutsushi",
Language = SourceMangaLanguage.Romanji
Language = Language.Romaji
}
],
Genres = ["Action", "Adventure"],
@@ -40,14 +42,15 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
MangaPipelineRequest request = new()
{
SourceName = "MySource",
SourceUrl = "https://wwww.mymangasource.org/my-manga",
SourceManga = sourceManga
};
await pipeline.RunAsync(request);
Assert.Single(context.Mangas);
Assert.Single(context.MangaTitles);
Assert.Equal(2, context.Genres.Count());
Assert.Single(context.MangaChapters);
context.Mangas.ShouldHaveSingleItem();
context.MangaTitles.ShouldHaveSingleItem();
context.Genres.Count().ShouldBe(2);
context.MangaChapters.ShouldHaveSingleItem();
}
}