Added Source Chapter and Source Page entities.
This commit is contained in:
@@ -42,12 +42,12 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.6" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="NSubstitute" Version="5.3.0" />
|
||||
<PackageReference Include="Shouldly" Version="4.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0">
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -43,14 +43,14 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
|
||||
]
|
||||
};
|
||||
|
||||
MangaPipelineRequest request = new()
|
||||
MangaMetadataPipelineRequest request = new()
|
||||
{
|
||||
SourceName = "MySource",
|
||||
SourceUrl = "https://wwww.mymangasource.org/my-manga",
|
||||
SourceManga = sourceManga
|
||||
};
|
||||
|
||||
await pipeline.RunAsync(request);
|
||||
await pipeline.RunMetadataAsync(request);
|
||||
|
||||
context.Mangas.ShouldHaveSingleItem();
|
||||
context.MangaTitles.Count().ShouldBe(2);
|
||||
@@ -58,6 +58,6 @@ public class MangaPipelineTests(TestDbContextFactory factory) : IClassFixture<Te
|
||||
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();
|
||||
context.SourceChapters.ShouldHaveSingleItem();
|
||||
}
|
||||
}
|
||||
@@ -16,14 +16,16 @@ public class MangaSearchCoordinatorTests
|
||||
[
|
||||
new()
|
||||
{
|
||||
Title = "Test Manga 1",
|
||||
Source = "Manga Source 1",
|
||||
Url = "https://mangasource1.com/manga/1",
|
||||
Title = "Test Manga 1",
|
||||
Thumbnail = "https://mangasource1.com/manga/cover/1.png"
|
||||
},
|
||||
new()
|
||||
{
|
||||
Source = "Manga Source 1",
|
||||
Url = "https://mangasource1.com/manga/2",
|
||||
Title = "Test Manga 2",
|
||||
Url = "https://mangasource2.com/manga/2",
|
||||
Thumbnail = "https://mangasource2.com/manga/cover/2.png"
|
||||
}
|
||||
]);
|
||||
@@ -35,8 +37,9 @@ public class MangaSearchCoordinatorTests
|
||||
[
|
||||
new()
|
||||
{
|
||||
Source = "Manga Source 2",
|
||||
Url = "https://mangasource2.com/manga/3",
|
||||
Title = "Test Manga 3",
|
||||
Url = "https://mangasource3.com/manga/3",
|
||||
Thumbnail = "https://mangasource3.com/manga/cover/3.png"
|
||||
},
|
||||
]);
|
||||
@@ -57,14 +60,16 @@ public class MangaSearchCoordinatorTests
|
||||
[
|
||||
new()
|
||||
{
|
||||
Title = "Test Manga 1",
|
||||
Source = "Manga Source 1",
|
||||
Url = "https://mangasource1.com/manga/1",
|
||||
Title = "Test Manga 1",
|
||||
Thumbnail = "https://mangasource1.com/manga/cover/1.png"
|
||||
},
|
||||
new()
|
||||
{
|
||||
Source = "Manga Source 1",
|
||||
Url = "https://mangasource1.com/manga/2",
|
||||
Title = "Test Manga 2",
|
||||
Url = "https://mangasource2.com/manga/2",
|
||||
Thumbnail = "https://mangasource2.com/manga/cover/2.png"
|
||||
}
|
||||
]);
|
||||
@@ -73,8 +78,9 @@ public class MangaSearchCoordinatorTests
|
||||
[
|
||||
new()
|
||||
{
|
||||
Source = "Manga Source 2",
|
||||
Url = "https://mangasource2.com/manga/3",
|
||||
Title = "Test Manga 3",
|
||||
Url = "https://mangasource3.com/manga/3",
|
||||
Thumbnail = "https://mangasource3.com/manga/cover/3.png"
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user