Revert "Added full namespace to Xbmc Metadata tests"

This reverts commit bc4779f9da.
pull/4/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() public void should_not_blowup()
{ {
WithSingleEpisodeFile(); WithSingleEpisodeFile();
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries); Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
} }
[Test] [Test]
public void should_call_diskprovider_writeAllText_once_for_single_episode() public void should_call_diskprovider_writeAllText_once_for_single_episode()
{ {
WithSingleEpisodeFile(); 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()); 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() public void should_call_diskprovider_writeAllText_once_for_multi_episode()
{ {
WithMultiEpisodeFile(); 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()); 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() public void should_download_thumbnail_when_thumbnail_path_is_not_null()
{ {
WithSingleEpisodeFile(); 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()); 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] [Test]
public void should_not_blowup() public void should_not_blowup()
{ {
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries); Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
} }
[Test] [Test]
public void should_call_diskprovider_writeAllText() 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()); Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(Path.Combine(series.Path, "tvshow.nfo"), It.IsAny<string>()), Times.Once());
} }
[Test] [Test]
public void should_download_fanart() 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()); Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.FanartPath, Path.Combine(series.Path, "fanart.jpg")), Times.Once());
} }
[Test] [Test]
public void should_download_poster_when_useBanners_is_false() 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()); 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() public void should_download_banner_when_useBanners_is_true()
{ {
WithUseBanners(); 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()); Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.BannerPath, Path.Combine(series.Path, "folder.jpg")), Times.Once());
} }
[Test] [Test]
public void should_download_season_poster_when_useBanners_is_false() 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)); 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() public void should_download_season_banner_when_useBanners_is_true()
{ {
WithUseBanners(); 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)); 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(); WithUseBanners();
WithSpecials(); 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)); 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