Pushing up changes
Fixed issue with cleanTitleTest. Tried some patterns for "Cyberpunk 2077" but reverted
This commit is contained in:
parent
d07372b911
commit
0be13399f4
3 changed files with 20 additions and 12 deletions
|
|
@ -48,10 +48,12 @@ namespace API.Tests.Parser
|
|||
[InlineData("Chew v1 - Taster´s Choise (2012) (Digital) (1920) (Kingpin-Empire)", "Chew")]
|
||||
[InlineData("Chew Script Book (2011) (digital-Empire) SP04", "Chew Script Book")]
|
||||
[InlineData("Batman - Detective Comics - Rebirth Deluxe Edition Book 02 (2018) (digital) (Son of Ultron-Empire)", "Batman - Detective Comics - Rebirth Deluxe Edition Book")]
|
||||
[InlineData("Cyberpunk 2077 - Your Voice 01", "Cyberpunk 2077")]
|
||||
[InlineData("Cyberpunk 2077 - Your Voice 01", "Cyberpunk 2077 - Your Voice")]
|
||||
[InlineData("Cyberpunk 2077 #01", "Cyberpunk 2077")]
|
||||
[InlineData("Cyberpunk 2077 - Trauma Team 04.cbz", "Cyberpunk 2077 - Trauma Team")]
|
||||
[InlineData("Batgirl Vol.2000 #57 (December, 2004)", "Batgirl")]
|
||||
[InlineData("Batgirl V2000 #57", "Batgirl")]
|
||||
[InlineData("Fables 021 (2004) (Digital) (Nahga-Empire).cbr", "Fables")]
|
||||
public void ParseComicSeriesTest(string filename, string expected)
|
||||
{
|
||||
Assert.Equal(expected, API.Parser.Parser.ParseComicSeries(filename));
|
||||
|
|
@ -84,6 +86,8 @@ namespace API.Tests.Parser
|
|||
[InlineData("Chew Script Book (2011) (digital-Empire) SP04", "0")]
|
||||
[InlineData("Batgirl Vol.2000 #57 (December, 2004)", "2000")]
|
||||
[InlineData("Batgirl V2000 #57", "2000")]
|
||||
[InlineData("Fables 021 (2004) (Digital) (Nahga-Empire).cbr", "0")]
|
||||
[InlineData("Cyberpunk 2077 - Trauma Team 04.cbz", "0")]
|
||||
public void ParseComicVolumeTest(string filename, string expected)
|
||||
{
|
||||
Assert.Equal(expected, API.Parser.Parser.ParseComicVolume(filename));
|
||||
|
|
@ -120,6 +124,8 @@ namespace API.Tests.Parser
|
|||
[InlineData("Chew Script Book (2011) (digital-Empire) SP04", "0")]
|
||||
[InlineData("Batgirl Vol.2000 #57 (December, 2004)", "57")]
|
||||
[InlineData("Batgirl V2000 #57", "57")]
|
||||
[InlineData("Fables 021 (2004) (Digital) (Nahga-Empire).cbr", "21")]
|
||||
[InlineData("Cyberpunk 2077 - Trauma Team 04.cbz", "4")]
|
||||
public void ParseComicChapterTest(string filename, string expected)
|
||||
{
|
||||
Assert.Equal(expected, API.Parser.Parser.ParseComicChapter(filename));
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ namespace API.Tests.Parser
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("Hello_I_am_here", "Hello I am here")]
|
||||
[InlineData("Hello_I_am_here ", "Hello I am here")]
|
||||
[InlineData("[ReleaseGroup] The Title", "The Title")]
|
||||
[InlineData("[ReleaseGroup]_The_Title", "The Title")]
|
||||
[InlineData("[Suihei Kiki]_Kasumi_Otoko_no_Ko_[Taruby]_v1.1", "Kasumi Otoko no Ko v1.1")]
|
||||
[InlineData("Batman - Detective Comics - Rebirth Deluxe Edition Book 04 (2019) (digital) (Son of Ultron-Empire)", "Batman - Detective Comics - Rebirth Deluxe Edition")]
|
||||
public void CleanTitleTest(string input, string expected)
|
||||
[InlineData("Hello_I_am_here", false, "Hello I am here")]
|
||||
[InlineData("Hello_I_am_here ", false, "Hello I am here")]
|
||||
[InlineData("[ReleaseGroup] The Title", false, "The Title")]
|
||||
[InlineData("[ReleaseGroup]_The_Title", false, "The Title")]
|
||||
[InlineData("[Suihei Kiki]_Kasumi_Otoko_no_Ko_[Taruby]_v1.1", false, "Kasumi Otoko no Ko v1.1")]
|
||||
[InlineData("Batman - Detective Comics - Rebirth Deluxe Edition Book 04 (2019) (digital) (Son of Ultron-Empire)", true, "Batman - Detective Comics - Rebirth Deluxe Edition")]
|
||||
public void CleanTitleTest(string input, bool isComic, string expected)
|
||||
{
|
||||
Assert.Equal(expected, CleanTitle(input));
|
||||
Assert.Equal(expected, CleanTitle(input, isComic));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue