Feature/unit tests (#171)

* Removed a duplicate loop that was already done earlier in method.

* Normalize now replaces underscores

* Added more Parser cases, Added test case for SeriesExtension (Name in List), and added MergeNameTest and some TODOs for where tests should go

* Added a test for removal

* Fixed bad merge

Co-authored-by: Andrew Song <asong641@gmail.com>
This commit is contained in:
Joseph Milazzo 2021-04-13 10:24:44 -05:00 committed by GitHub
parent 6ba00477e7
commit d59d60d9ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 205 additions and 54 deletions

View file

@ -409,7 +409,7 @@ namespace API.Parser
return ret.Series == string.Empty ? null : ret;
}
private static MangaFormat ParseFormat(string filePath)
public static MangaFormat ParseFormat(string filePath)
{
if (IsArchive(filePath)) return MangaFormat.Archive;
if (IsImage(filePath)) return MangaFormat.Image;
@ -742,7 +742,7 @@ namespace API.Parser
public static string Normalize(string name)
{
return name.ToLower().Replace("-", "").Replace(" ", "").Replace(":", "");
return name.ToLower().Replace("-", "").Replace(" ", "").Replace(":", "").Replace("_", "");
}
/// <summary>