2014-11-05 16:45:50 +00:00
|
|
|
|
using System;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.TvTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class SeriesTitleNormalizerFixture
|
|
|
|
|
{
|
2014-12-12 23:49:32 +00:00
|
|
|
|
[TestCase("A to Z", 281588, "a to z")]
|
|
|
|
|
[TestCase("A. D. - The Trials & Triumph of the Early Church", 266757, "ad trials triumph early church")]
|
|
|
|
|
public void should_use_precomputed_title(string title, int tvdbId, string expected)
|
2014-11-05 16:45:50 +00:00
|
|
|
|
{
|
2014-12-12 23:49:32 +00:00
|
|
|
|
SeriesTitleNormalizer.Normalize(title, tvdbId).Should().Be(expected);
|
2014-11-05 16:45:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestCase("2 Broke Girls", "2 broke girls")]
|
|
|
|
|
[TestCase("Archer (2009)", "archer 2009")]
|
|
|
|
|
[TestCase("The Office (US)", "office us")]
|
|
|
|
|
[TestCase("The Mentalist", "mentalist")]
|
|
|
|
|
[TestCase("The Good Wife", "good wife")]
|
|
|
|
|
[TestCase("The Newsroom (2012)", "newsroom 2012")]
|
2014-11-19 06:01:16 +00:00
|
|
|
|
[TestCase("Special Agent Oso", "special agent oso")]
|
2014-11-05 16:45:50 +00:00
|
|
|
|
public void should_normalize_title(String title, String expected)
|
|
|
|
|
{
|
|
|
|
|
SeriesTitleNormalizer.Normalize(title, 0).Should().Be(expected);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|