Fixed broken tests after new SceneName method.

pull/3113/head
Mark McDowall 14 years ago
parent a290a0dcb0
commit e934e71b3b

@ -247,6 +247,9 @@ namespace NzbDrone.Core.Test
mocker.GetMock<InventoryProvider>()
.Setup(c => c.IsQualityNeeded(It.Is<EpisodeParseResult>(d => d.Series != null && d.Episodes.Count != 0))).Returns(false);
mocker.GetMock<SceneNameMappingProvider>()
.Setup(s => s.GetSceneName(It.IsAny<int>())).Returns("");
//Act
mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), episode.EpisodeId);
@ -295,6 +298,9 @@ namespace NzbDrone.Core.Test
mocker.GetMock<InventoryProvider>()
.Setup(c => c.IsQualityNeeded(It.Is<EpisodeParseResult>(d => d.Series != null && d.Episodes.Count != 0))).Returns(false);
mocker.GetMock<SceneNameMappingProvider>()
.Setup(s => s.GetSceneName(71256)).Returns("The Daily Show");
//Act
mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), episode.EpisodeId);
@ -347,7 +353,10 @@ namespace NzbDrone.Core.Test
.Returns(indexers);
mocker.GetMock<InventoryProvider>()
.Setup(c => c.IsQualityNeeded(It.Is<EpisodeParseResult>(d => d.Series != null && d.Episodes.Count != 0))).Returns(false);
.Setup(c => c.IsQualityNeeded(It.Is<EpisodeParseResult>(d => d.Series != null && d.Episodes.Count != 0))).Returns(false);;
mocker.GetMock<SceneNameMappingProvider>()
.Setup(s => s.GetSceneName(It.IsAny<int>())).Returns("");
//Act
mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), episode.EpisodeId);

@ -46,7 +46,7 @@ namespace NzbDrone.Core
private static readonly Regex NormalizeRegex = new Regex(@"((^|\W)(a|an|the|and|or|of)($|\W))|\W|(?:(?<=[^0-9]+)|\b)(?!(?:19\d{2}|20\d{2}))\d+(?=[^0-9ip]+|\b)",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\\|\/|\<|\>|\?|\*|\:|\|",
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\<|\>|\?|\*|\:|\|",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
/// <summary>

@ -23,6 +23,11 @@ namespace NzbDrone.Core.Providers
_httpProvider = httpProvider;
}
public SceneNameMappingProvider()
{
}
public virtual bool UpdateMappings()
{
try

Loading…
Cancel
Save