|
|
|
@ -46,10 +46,16 @@ namespace NzbDrone.Core.Test.ParserTests
|
|
|
|
|
[TestCase("Castle.2009.S01E14.HDTV.XviD.HUNDUB-LOL", Language.Hungarian)]
|
|
|
|
|
[TestCase("Castle.2009.S01E14.HDTV.XviD.ENG.HUN-LOL", Language.Hungarian)]
|
|
|
|
|
[TestCase("Castle.2009.S01E14.HDTV.XviD.HUN-LOL", Language.Hungarian)]
|
|
|
|
|
[TestCase("The Danish Girl 2015", Language.English)]
|
|
|
|
|
public void should_parse_language(string postTitle, Language language)
|
|
|
|
|
{
|
|
|
|
|
var result = LanguageParser.ParseLanguage(postTitle);
|
|
|
|
|
result.Should().Be(language);
|
|
|
|
|
var result = Parser.Parser.ParseMovieTitle(postTitle);
|
|
|
|
|
if (result == null)
|
|
|
|
|
{
|
|
|
|
|
Parser.Parser.ParseTitle(postTitle).Language.Should().Be(language);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
result.Language.Should().Be(language);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestCase("2 Broke Girls - S01E01 - Pilot.en.sub", Language.English)]
|
|
|
|
|