Revert "Added full namespace to Xbmc Metadata tests"

This reverts commit bc4779f9da.
pull/3113/head
Mark McDowall 13 years ago
parent bc4779f9da
commit f338ada2d8

@ -123,14 +123,14 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
public void should_not_blowup()
{
WithSingleEpisodeFile();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
}
[Test]
public void should_call_diskprovider_writeAllText_once_for_single_episode()
{
WithSingleEpisodeFile();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(episodeFile.Path.Replace("avi", "nfo"), It.IsAny<string>()), Times.Once());
}
@ -138,7 +138,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
public void should_call_diskprovider_writeAllText_once_for_multi_episode()
{
WithMultiEpisodeFile();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(episodeFile.Path.Replace("avi", "nfo"), It.IsAny<string>()), Times.Once());
}
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
public void should_download_thumbnail_when_thumbnail_path_is_not_null()
{
WithSingleEpisodeFile();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.Episodes.First().BannerPath, episodeFile.Path.Replace("avi", "tbn")), Times.Once());
}
}

@ -106,27 +106,27 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
[Test]
public void should_not_blowup()
{
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
}
[Test]
public void should_call_diskprovider_writeAllText()
{
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(Path.Combine(series.Path, "tvshow.nfo"), It.IsAny<string>()), Times.Once());
}
[Test]
public void should_download_fanart()
{
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.FanartPath, Path.Combine(series.Path, "fanart.jpg")), Times.Once());
}
[Test]
public void should_download_poster_when_useBanners_is_false()
{
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.PosterPath, Path.Combine(series.Path, "folder.jpg")), Times.Once());
}
@ -134,14 +134,14 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
public void should_download_banner_when_useBanners_is_true()
{
WithUseBanners();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.BannerPath, Path.Combine(series.Path, "folder.jpg")), Times.Once());
}
[Test]
public void should_download_season_poster_when_useBanners_is_false()
{
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => !s.Contains("banners")), It.IsRegex(@"season\d{2}\.tbn")), Times.Exactly(2));
}
@ -149,7 +149,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
public void should_download_season_banner_when_useBanners_is_true()
{
WithUseBanners();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => s.Contains("banners")), It.IsRegex(@"season\d{2}\.tbn")), Times.Exactly(2));
}
@ -158,7 +158,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
{
WithUseBanners();
WithSpecials();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => s.Contains("banners")), It.IsRegex(@"season-specials.tbn")), Times.Exactly(1));
}
}

Loading…
Cancel
Save