Cleanup and tests around ImportFile

This commit is contained in:
kay.one 2011-06-21 18:12:20 -07:00
commit 01163a4f87
30 changed files with 1864 additions and 412 deletions

View file

@ -588,6 +588,22 @@ namespace NzbDrone.Core.Test
episodes.Should().NotBeEmpty();
}
[Test]
public void GetEpisode_by_Season_Episode_none_existing()
{
var mocker = new AutoMoqer();
var db = MockLib.GetEmptyDatabase();
mocker.SetConstant(db);
//Act
var episode = mocker.Resolve<EpisodeProvider>().GetEpisode(1, 1, 1);
//Assert
episode.Should().BeNull();
}
[Test]
public void GetEpisode_by_Season_Episode_with_EpisodeFile()
{
@ -644,6 +660,9 @@ namespace NzbDrone.Core.Test
episode.EpisodeFile.Should().BeNull();
}
[Test]
public void GetEpisode_by_AirDate_with_EpisodeFile()
{
@ -697,5 +716,8 @@ namespace NzbDrone.Core.Test
episode.Series.ShouldHave().AllProperties().EqualTo(fakeSeries);
episode.EpisodeFile.Should().BeNull();
}
}
}