Refactored GetCoverImage to a static class and unit tested it. Enhanced the method by defaulting to folder.jpg file if exists, else takes first entry.
This commit is contained in:
parent
451d459473
commit
7f5a1d0518
12 changed files with 92 additions and 27 deletions
|
@ -82,5 +82,15 @@ namespace API.Tests
|
|||
{
|
||||
Assert.Equal(expected, CleanTitle(input));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("test.cbz", true)]
|
||||
[InlineData("test.cbr", true)]
|
||||
[InlineData("test.zip", true)]
|
||||
[InlineData("test.rar", true)]
|
||||
public void IsArchiveTest(string input, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, IsArchive(input));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue