Finished MangaDexMetadataProvider logic.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using MangaReader.Core.Metadata;
|
||||
using MangaReader.Core.Sources.MangaNato.Metadata;
|
||||
using Shouldly;
|
||||
using System.Data;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MangaReader.Tests.WebCrawlers;
|
||||
|
||||
@@ -39,13 +41,19 @@ public class UnitTest1
|
||||
|
||||
manga.Title.ShouldBe("Please Go Home, Akutsu-San!");
|
||||
|
||||
manga.AlternateTitles.ShouldBe([
|
||||
manga.AlternateTitles.Select(x => x.Title).ShouldBe([
|
||||
"Kaette kudasai! Akutsu-san",
|
||||
"Yankee Musume",
|
||||
"ヤンキー娘",
|
||||
"帰ってください! 阿久津さん"]);
|
||||
|
||||
manga.Authors.ShouldBe(["Nagaoka Taichi"]);
|
||||
SourceMangaContributor[] expectedContributors =
|
||||
[
|
||||
new() { Name = "Nagaoka Taichi", Role = SourceMangaContributorRole.Author }
|
||||
];
|
||||
|
||||
manga.Contributors.ShouldBeEquivalentTo(expectedContributors);
|
||||
|
||||
manga.Status.ShouldBe(MangaStatus.Ongoing);
|
||||
manga.Genres.ShouldBe(["Comedy", "Romance", "School life"]);
|
||||
manga.UpdateDate.ShouldBe(new DateTime(2024, 9, 26, 0, 12, 0));
|
||||
@@ -61,13 +69,13 @@ public class UnitTest1
|
||||
|
||||
manga.Chapters[0].Url.ShouldBe("https://chapmanganato.to/manga-hf984788/chapter-186");
|
||||
manga.Chapters[0].Number.ShouldBe(186);
|
||||
manga.Chapters[0].Name.ShouldBe("Chapter 186");
|
||||
manga.Chapters[0].Title.ShouldBe("Chapter 186");
|
||||
manga.Chapters[0].Views.ShouldBe(37_900);
|
||||
manga.Chapters[0].UploadDate.ShouldBe(new DateTime(2024, 9, 26, 0, 9, 0));
|
||||
|
||||
manga.Chapters[235].Url.ShouldBe("https://chapmanganato.to/manga-hf984788/chapter-0.1");
|
||||
manga.Chapters[235].Number.ShouldBe(0.1f);
|
||||
manga.Chapters[235].Name.ShouldBe("Vol.0 Chapter : Oneshot");
|
||||
manga.Chapters[235].Title.ShouldBe("Vol.0 Chapter : Oneshot");
|
||||
manga.Chapters[235].Views.ShouldBe(232_200);
|
||||
manga.Chapters[235].UploadDate.ShouldBe(new DateTime(2021, 8, 24, 1, 8, 0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user