Reworked the logic for finding comicinfo to ensure that it finds top-level first and stream lined the logic. (#1008)

This commit is contained in:
Joseph Milazzo 2022-01-29 08:50:24 -08:00 committed by GitHub
parent c3a6e53cbb
commit fd46cda7c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 39 deletions

View file

@ -257,6 +257,17 @@ namespace API.Tests.Services
Assert.Equal("Junya Inoue", comicInfo.Writer);
}
[Fact]
public void ShouldHaveComicInfo_TopLevelFileOnly()
{
var testDirectory = Path.Join(Directory.GetCurrentDirectory(), "../../../Services/Test Data/ArchiveService/ComicInfos");
var archive = Path.Join(testDirectory, "ComicInfo_duplicateInfos.zip");
var comicInfo = _archiveService.GetComicInfo(archive);
Assert.NotNull(comicInfo);
Assert.Equal("BTOOOM!", comicInfo.Series);
}
#endregion
#region CanParseComicInfo